diff options
Diffstat (limited to 'lib/python/Components/PluginComponent.py')
| -rw-r--r-- | lib/python/Components/PluginComponent.py | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/lib/python/Components/PluginComponent.py b/lib/python/Components/PluginComponent.py index 0b407021..67373ea7 100644 --- a/lib/python/Components/PluginComponent.py +++ b/lib/python/Components/PluginComponent.py @@ -20,21 +20,24 @@ class PluginComponent: for x in dir: path = resolveFilename(SCOPE_PLUGINS, x) + "/" - if os.path.exists(path): - if fileExists(path + "plugin.py"): - pluginmodule = self.prefix + x + ".plugin" - print "trying to import " + pluginmodule - exec "import " + pluginmodule - plugin = eval(pluginmodule) - picturepath = plugin.getPicturePath() - pluginname = plugin.getPluginName() - try: - for menuEntry in plugin.getMenuRegistrationList(): - self.menuEntries.append([menuEntry, pluginmodule]) - except: - pass - - list.append((picturepath, pluginname , x)) + try: + if os.path.exists(path): + if fileExists(path + "plugin.py"): + pluginmodule = self.prefix + x + ".plugin" + print "trying to import " + pluginmodule + exec "import " + pluginmodule + plugin = eval(pluginmodule) + picturepath = plugin.getPicturePath() + pluginname = plugin.getPluginName() + try: + for menuEntry in plugin.getMenuRegistrationList(): + self.menuEntries.append([menuEntry, pluginmodule]) + except: + pass + + list.append((picturepath, pluginname , x)) + except: + print "Directory", path, "contains a faulty plugin" self.menuUpdate() return list |
