Commit 2c0e634e by devttys0

Changed how plugin exceptions are handled/reported.

parent 0f6db187
......@@ -183,13 +183,14 @@ class Plugins(object):
plugins[key]['modules'].append(module)
except KeyboardInterrupt as e:
raise e
# Python files in the plugins directory that are not
# actually binwalk plugins will generate a TypeError
# about converting an object to a string implicitly.
# Don't need to warn about these.
except TypeError:
pass
except Exception as e:
# Python files in the plugins directory that are not
# actually binwalk plugins will generate a TypeError
# about converting an object to a string implicitly.
# Don't need to warn about these.
if not str(e).endswith('object to str implicitly'):
binwalk.core.common.warning("Error loading plugin '%s': %s" % (file_name, str(e)))
binwalk.core.common.warning("Error loading plugin '%s': %s" % (file_name, str(e)))
plugins[key]['enabled'][module] = False
try:
......
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