summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic/3rdparty
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:47:36 +0100
commita4da21d92f461e85e90a866f4a1da34ba1c9551a (patch)
tree79bbf1c403f08487f4a4c29327fff0e0758dbf7b /scripts/lib/wic/3rdparty
parent4862a4c33a461d0f4dd75843d2f0a8b03a593b05 (diff)
downloadpoky-a4da21d92f461e85e90a866f4a1da34ba1c9551a.tar.gz
wic: code cleanup: superfluous-parens
Removed unncecessary parents after 'if' 'del' and 'print' keywords. Fixed pyling warning: Unnecessary parens after 'xxx' keyword (From OE-Core rev: a64604d11f75973b4c2347fa2669da9889e44013) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/wic/3rdparty')
-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):
145 145
146def _check_size(option, opt, value): 146def _check_size(option, opt, value):
147 # Former default was MB 147 # Former default was MB
148 if (value.isdigit()): 148 if value.isdigit():
149 return int(value) * 1024L 149 return int(value) * 1024L
150 150
151 mapping = {"opt": opt, "value": value} 151 mapping = {"opt": opt, "value": value}
152 if (not value[:-1].isdigit()): 152 if not value[:-1].isdigit():
153 raise OptionValueError(_("Option %(opt)s: invalid size value: %(value)r") % mapping) 153 raise OptionValueError(_("Option %(opt)s: invalid size value: %(value)r") % mapping)
154 154
155 size = int(value[:-1]) 155 size = int(value[:-1])
156 if (value.endswith("k") or value.endswith("K")): 156 if value.endswith("k") or value.endswith("K"):
157 return size 157 return size
158 if (value.endswith("M")): 158 if value.endswith("M"):
159 return size * 1024L 159 return size * 1024L
160 if (value.endswith("G")): 160 if value.endswith("G"):
161 return size * 1024L * 1024L 161 return size * 1024L * 1024L
162 raise OptionValueError(_("Option %(opt)s: invalid size value: %(value)r") % mapping) 162 raise OptionValueError(_("Option %(opt)s: invalid size value: %(value)r") % mapping)
163 163