changeset ba135dfc0f5a in /home/hg/repos/gajim
author: Yann Leboulanger asterix@lagaule.org branches: gajim_0.16 details:http://hg.gajim.org/gajim?cmd=changeset;node=ba135dfc0f5a description: prevent crash when a plugin is wrong.
diffstat:
src/plugins/pluginmanager.py | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-)
diffs (17 lines):
diff -r 34318236c9b8 -r ba135dfc0f5a src/plugins/pluginmanager.py --- a/src/plugins/pluginmanager.py Sun Jan 03 22:26:15 2016 +0100 +++ b/src/plugins/pluginmanager.py Sun Feb 21 10:25:45 2016 +0100 @@ -452,11 +452,8 @@ file_path += os.path.sep try: module = __import__(module_name) - except ValueError, value_error: - log.debug(value_error) - except ImportError, import_error: - log.debug(import_error) - + except (ValueError, ImportError, AttributeError) as error: + log.debug(error)
if module is None: continue