diff options
author | René 'Necoro' Neumann <necoro@necoro.net> | 2008-07-04 17:37:01 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.net> | 2008-07-04 17:37:01 +0200 |
commit | 624d0dd5d4ea23553a83121218a9d445257e7427 (patch) | |
tree | f4c9edd5d4a00d0eb1a3217b122cacb24db6313e /portato | |
parent | cf70f253a11871ba6db372eb4735335ec97129cd (diff) | |
download | portato-624d0dd5d4ea23553a83121218a9d445257e7427.tar.gz portato-624d0dd5d4ea23553a83121218a9d445257e7427.tar.bz2 portato-624d0dd5d4ea23553a83121218a9d445257e7427.zip |
Ignore errors on plugin loading
Diffstat (limited to '')
-rw-r--r-- | portato/plugin.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/portato/plugin.py b/portato/plugin.py index ada7a0f..b6376da 100644 --- a/portato/plugin.py +++ b/portato/plugin.py @@ -14,6 +14,7 @@ from __future__ import absolute_import import os import os.path as osp +import traceback from collections import defaultdict from functools import wraps @@ -145,6 +146,8 @@ class PluginQueue (object): else: if f.endswith(".py"): plugins.append(f[:-3]) + elif f.endswith(".pyc") or f.endswith(".pyo"): + pass # ignore .pyc and .pyo else: debug("'%s' is not a plugin: not a .py file", path) @@ -157,6 +160,9 @@ class PluginQueue (object): exec "from portato.plugins import %s" % p in {} except PluginLoadException, e: error(_("Loading plugin '%(plugin)s' failed: %(error)s"), {"plugin" : p, "error" : e.message}) + except: + tb = traceback.format_exc() + error(_("Loading plugin '%(plugin)s' failed: %(error)s"), {"plugin" : p, "error" : tb}) self._organize() |