From 3f7d341fffe7e5f7138088ba51e88d3a2e0006cd Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Tue, 19 May 2015 22:13:41 +0200 Subject: [PATCH] edit pluginloader.py --- plugin_test/pluginloader.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/plugin_test/pluginloader.py b/plugin_test/pluginloader.py index f071bf8..c53ec0a 100644 --- a/plugin_test/pluginloader.py +++ b/plugin_test/pluginloader.py @@ -16,19 +16,18 @@ def getPlugins(): # plugins have to be a subdir with MainModule, if not skip if not os.path.isdir(location) or not i + ".py" in os.listdir(location): continue - logging.debug("found plugin: "+i) # is the plugin enabled in the config-file? try: usePlugin = int(globals.config.get("Plugins", i)) except: #no entry for plugin found in config-file, skip - logging.warning("Plugin not in config: "+i) + logging.warning("Plugin not in config: %s", i) - logging.debug("use Plugin: "+str(usePlugin)) + if usePlugin: info = imp.find_module(i, [location]) plugins.append({"name": i, "info": info}) - logging.debug("append Plugin: "+i) + logging.debug("use Plugin: %s", i) return plugins def loadPlugin(plugin):