diff options
| author | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2006-01-10 15:54:22 +0000 |
|---|---|---|
| committer | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2006-01-10 15:54:22 +0000 |
| commit | 2d470a436a60b917a27c2055952a0a24374b994c (patch) | |
| tree | acb2ec9b53814e8db01a35b459220a05c4897711 /lib/python | |
| parent | 91890bc31f2752aa8ff55372aa69a6723a0c09b5 (diff) | |
| download | enigma2-2d470a436a60b917a27c2055952a0a24374b994c.tar.gz enigma2-2d470a436a60b917a27c2055952a0a24374b994c.zip | |
add missing __init__.py
add a try/except block around the plugin loading for faulty plugins
Diffstat (limited to 'lib/python')
| -rw-r--r-- | lib/python/Components/PluginComponent.py | 33 | ||||
| -rw-r--r-- | lib/python/Plugins/update/__init__.py | 0 |
2 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 diff --git a/lib/python/Plugins/update/__init__.py b/lib/python/Plugins/update/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/lib/python/Plugins/update/__init__.py |
