pluginmanager.better exception handling when importing modules

This commit is contained in:
Denis Fomin 2011-09-07 10:31:34 +03:00
parent b9dc820161
commit 2512f29076
1 changed files with 4 additions and 4 deletions

View File

@ -415,9 +415,9 @@ class PluginManager(object):
try: try:
module = __import__(module_name) module = __import__(module_name)
except ValueError, value_error: except ValueError, value_error:
pass log.debug(value_error)
except ImportError, import_error: except ImportError, import_error:
pass log.debug(import_error)
elif os.path.isdir(file_path) and scan_dirs: elif os.path.isdir(file_path) and scan_dirs:
module_name = elem_name module_name = elem_name
@ -425,9 +425,9 @@ class PluginManager(object):
try: try:
module = __import__(module_name) module = __import__(module_name)
except ValueError, value_error: except ValueError, value_error:
pass log.debug(value_error)
except ImportError, import_error: except ImportError, import_error:
pass log.debug(import_error)
if module is None: if module is None: