summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchfw <wangc_2011@hotmail.com>2018-11-05 22:08:32 (GMT)
committerchfw <wangc_2011@hotmail.com>2018-11-05 22:08:32 (GMT)
commit1e32e015586e1de2742f64822174ab8b62d08cf0 (patch)
tree5efb06a14b23327a526dade1a307eea0dc7a3259
parent616b233616c5ff5a4b7a518b2dba4f9bf03871d9 (diff)
downloadpython-lml-1e32e015586e1de2742f64822174ab8b62d08cf0.zip
python-lml-1e32e015586e1de2742f64822174ab8b62d08cf0.tar.gz
python-lml-1e32e015586e1de2742f64822174ab8b62d08cf0.tar.bz2
:bug: eat the module not found error in python. fix #6
-rw-r--r--lml/utils.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lml/utils.py b/lml/utils.py
index 647254d..5cba010 100644
--- a/lml/utils.py
+++ b/lml/utils.py
@@ -47,6 +47,8 @@ def do_import(plugin_module_name):
plugin_module = getattr(plugin_module, module)
log.debug("found " + plugin_module_name)
return plugin_module
+ except ModuleNotFoundError:
+ log.info("Module %s is missing", plugin_module_name)
except ImportError:
log.exception("failed to import %s", plugin_module_name)
raise