diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-03-11 23:41:40 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-03-11 23:41:40 +0100 |
commit | b692dc0ba8e8940844eb647a1f15e435a55ce4eb (patch) | |
tree | 1653344e5b37504894fe2c2e226f9d8d094bd3bb /module/plugins/PluginManager.py | |
parent | fixed DepositFile free (diff) | |
download | pyload-b692dc0ba8e8940844eb647a1f15e435a55ce4eb.tar.xz |
Diffstat (limited to 'module/plugins/PluginManager.py')
-rw-r--r-- | module/plugins/PluginManager.py | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/module/plugins/PluginManager.py b/module/plugins/PluginManager.py index a911cdd1e..0848d520e 100644 --- a/module/plugins/PluginManager.py +++ b/module/plugins/PluginManager.py @@ -20,16 +20,11 @@ import re import sys -from os import listdir -from os import makedirs - -from os.path import isfile -from os.path import join -from os.path import exists -from os.path import abspath - +from os import listdir, makedirs +from os.path import isfile, join, exists, abspath from sys import version_info from itertools import chain +from traceback import print_exc try: from ast import literal_eval @@ -292,13 +287,15 @@ class PluginManager(): try: module = __import__(value["path"], globals(), locals(), [value["name"]] , -1) + pluginClass = getattr(module, name) except Exception, e: self.log.error(_("Error importing %(name)s: %(msg)s") % {"name": name, "msg": str(e) }) self.log.error(_("You should fix dependicies or deactivate load on startup.")) + if self.core.debug: + print_exc() + continue - - pluginClass = getattr(module, name) - + value["class"] = pluginClass classes.append(pluginClass) |