From 58a00607a64cc26820c8a995f5f7863e2465911d Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 28 Dec 2015 16:04:35 +0100 Subject: Spare code fixes (2) --- module/plugins/hooks/XFileSharing.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'module/plugins/hooks/XFileSharing.py') diff --git a/module/plugins/hooks/XFileSharing.py b/module/plugins/hooks/XFileSharing.py index e2f25e13f..201cbab53 100644 --- a/module/plugins/hooks/XFileSharing.py +++ b/module/plugins/hooks/XFileSharing.py @@ -9,7 +9,7 @@ from module.plugins.internal.Addon import Addon class XFileSharing(Addon): __name__ = "XFileSharing" __type__ = "hook" - __version__ = "0.53" + __version__ = "0.54" __status__ = "testing" __config__ = [("activated" , "bool", "Activated" , True ), @@ -91,7 +91,13 @@ class XFileSharing(Addon): isXFS = lambda klass: any(k.__name__.startswith("XFS") for k in inspect.getmro(klass)) for p in self.pyload.pluginManager.plugins[type].values(): - klass = self.pyload.pluginManager.loadClass(type, p['name']) + try: + klass = self.pyload.pluginManager.loadClass(type, p['name']) + + except AttributeError, e: + self.log_debug(e, trace=True) + continue + if hasattr(klass, "PLUGIN_DOMAIN") and klass.PLUGIN_DOMAIN and isXFS(klass): plugin_list.append(klass.PLUGIN_DOMAIN) -- cgit v1.2.3