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>
This commit is contained in:
Ed Bartosh
2015-06-17 14:47:47 +03:00
committed by Richard Purdie
parent 4862a4c33a
commit a4da21d92f
8 changed files with 23 additions and 23 deletions

View File

@@ -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)