Commit fa204efb authored by Reinhard Prix's avatar Reinhard Prix
Browse files

_optional_import: don't re-raise ImportError exception ever

- any import failure should just be treated as such: we can't import
  that module for whatever reason
parent 7e146315
......@@ -31,11 +31,8 @@ def _optional_import(modulename, shorthand=None):
logging.debug("Successfully imported module %s%s." % (modulename, shorthandbit))
success = True
except ImportError as e:
if e.message == "No module named " + modulename:
logging.debug("No module {:s} found.".format(modulename))
success = False
logging.debug("Failed to import module {:s}.".format(modulename))
success = False
return success
Supports Markdown
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