Commit 0b592bfa by Craig Heffner

Fixed bug in API argument parser where an argument of '1' was treated as 'True'

parent c00c53ae
......@@ -670,7 +670,7 @@ class Modules(object):
if kargv:
for (k, v) in iterator(kargv):
k = self._parse_api_opt(k)
if v not in [True, False, None]:
if v is not True and v is not False and v is not None:
if not isinstance(v, list):
v = [v]
for value in v:
......@@ -965,8 +965,7 @@ class Modules(object):
except Exception as e:
raise ModuleException("Invalid usage: %s" % str(e))
binwalk.core.common.debug("%s :: %s => %s" %
(module.TITLE, str(argv), str(kwargs)))
binwalk.core.common.debug("%s :: %s => %s" % (module.TITLE, str(argv), str(kwargs)))
return kwargs
def kwargs(self, obj, kwargs):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment