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:
|
||||
module = Module(__import__(module_name, fromlist=[str(module_name)]))
|
||||
except Exception, e:
|
||||
if self.logger.level == logging.DEBUG:
|
||||
if logging.root.level == logging.DEBUG:
|
||||
self.logger.exception(e)
|
||||
raise ModuleLoadError(module_name, e)
|
||||
finally:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue