correctly check debug level to print exception when a module can't be loaded
This commit is contained in:
parent
10dc63e4fa
commit
87a58baa50
1 changed files with 1 additions and 1 deletions
|
|
@ -136,7 +136,7 @@ class ModulesLoader(object):
|
||||||
try:
|
try:
|
||||||
module = Module(__import__(module_name, fromlist=[str(module_name)]))
|
module = Module(__import__(module_name, fromlist=[str(module_name)]))
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
if self.logger.level == logging.DEBUG:
|
if logging.root.level == logging.DEBUG:
|
||||||
self.logger.exception(e)
|
self.logger.exception(e)
|
||||||
raise ModuleLoadError(module_name, e)
|
raise ModuleLoadError(module_name, e)
|
||||||
finally:
|
finally:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue