correctly check debug level to print exception when a module can't be loaded

This commit is contained in:
Romain Bignon 2012-04-09 11:22:55 +02:00
commit 87a58baa50

View file

@ -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: