summaryrefslogtreecommitdiff
path: root/scripts/lib/wic/3rdparty/pykickstart/options.py
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2015-06-17 14:47:47 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-06-23 11:38:16 +0100
commita64604d11f75973b4c2347fa2669da9889e44013 (patch)
tree7f82503cb4457b233c28edb39a751bac865f5888 /scripts/lib/wic/3rdparty/pykickstart/options.py
parent2009df2aa048bb51b7b3050b69a44fe414c4de9d (diff)
downloadopenembedded-core-a64604d11f75973b4c2347fa2669da9889e44013.tar.gz
openembedded-core-a64604d11f75973b4c2347fa2669da9889e44013.tar.bz2
openembedded-core-a64604d11f75973b4c2347fa2669da9889e44013.zip
wic: code cleanup: superfluous-parens
Removed unncecessary parents after 'if' 'del' and 'print' keywords. Fixed pyling warning: Unnecessary parens after 'xxx' keyword Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Diffstat (limited to 'scripts/lib/wic/3rdparty/pykickstart/options.py')
-rw-r--r--scripts/lib/wic/3rdparty/pykickstart/options.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/lib/wic/3rdparty/pykickstart/options.py b/scripts/lib/wic/3rdparty/pykickstart/options.py
index b2d8e3e516..ebc23eda63 100644
--- a/scripts/lib/wic/3rdparty/pykickstart/options.py
+++ b/scripts/lib/wic/3rdparty/pykickstart/options.py
@@ -145,19 +145,19 @@ def _check_string(option, opt, value):
def _check_size(option, opt, value):
# Former default was MB
- if (value.isdigit()):
+ if value.isdigit():
return int(value) * 1024L
mapping = {"opt": opt, "value": value}
- if (not value[:-1].isdigit()):
+ if not value[:-1].isdigit():
raise OptionValueError(_("Option %(opt)s: invalid size value: %(value)r") % mapping)
size = int(value[:-1])
- if (value.endswith("k") or value.endswith("K")):
+ if value.endswith("k") or value.endswith("K"):
return size
- if (value.endswith("M")):
+ if value.endswith("M"):
return size * 1024L
- if (value.endswith("G")):
+ if value.endswith("G"):
return size * 1024L * 1024L
raise OptionValueError(_("Option %(opt)s: invalid size value: %(value)r") % mapping)