aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components/PluginComponent.py
diff options
context:
space:
mode:
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>2006-01-20 15:33:12 +0000
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>2006-01-20 15:33:12 +0000
commita63fe4fc45fc957dce2db4752839cb0191646e26 (patch)
treee9e567997dbd478368d294233d98547e61566b5f /lib/python/Components/PluginComponent.py
parent01f6932815a6a21ab46bb420be093685378b43dd (diff)
downloadenigma2-a63fe4fc45fc957dce2db4752839cb0191646e26.tar.gz
enigma2-a63fe4fc45fc957dce2db4752839cb0191646e26.zip
disable test-plugin
reenable the try/except block for faulty plugin catching don't expect a directory /usr/lib/tuxbox/plugins to be present by the tuxbox plugin starter
Diffstat (limited to 'lib/python/Components/PluginComponent.py')
-rw-r--r--lib/python/Components/PluginComponent.py64
1 files changed, 32 insertions, 32 deletions
diff --git a/lib/python/Components/PluginComponent.py b/lib/python/Components/PluginComponent.py
index 26eadd10..adfc98a0 100644
--- a/lib/python/Components/PluginComponent.py
+++ b/lib/python/Components/PluginComponent.py
@@ -20,38 +20,38 @@ class PluginComponent:
for x in dir:
path = resolveFilename(SCOPE_PLUGINS, 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)
- plugins = plugin.getPlugins()
- try: picturepaths = plugin.getPicturePaths()
- except:
- picturepaths = []
- for p in plugins:
- picturepaths.append("")
- try:
- for menuEntry in plugin.getMenuRegistrationList():
- self.menuEntries.append([menuEntry, pluginmodule])
- except:
- pass
-
- for y in range(len(plugins)):
- if len(plugins[y]) < 5:
- list.append((path + picturepaths[y], plugins[y][0] , x, plugins[y][2], plugins[y][3], None, plugins[y][1]))
- else:
- list.append((path + picturepaths[y], plugins[y][0] , x, plugins[y][2], plugins[y][3], plugins[y][4], plugins[y][1]))
- if runAutostartPlugins:
- try: plugin.autostart()
- except: pass
- if runAutoendPlugins:
- try: plugin.autoend()
- except: pass
-# except:
-# print "Directory", path, "contains a faulty plugin"
+ 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)
+ plugins = plugin.getPlugins()
+ try: picturepaths = plugin.getPicturePaths()
+ except:
+ picturepaths = []
+ for p in plugins:
+ picturepaths.append("")
+ try:
+ for menuEntry in plugin.getMenuRegistrationList():
+ self.menuEntries.append([menuEntry, pluginmodule])
+ except:
+ pass
+
+ for y in range(len(plugins)):
+ if len(plugins[y]) < 5:
+ list.append((path + picturepaths[y], plugins[y][0] , x, plugins[y][2], plugins[y][3], None, plugins[y][1]))
+ else:
+ list.append((path + picturepaths[y], plugins[y][0] , x, plugins[y][2], plugins[y][3], plugins[y][4], plugins[y][1]))
+ if runAutostartPlugins:
+ try: plugin.autostart()
+ except: pass
+ if runAutoendPlugins:
+ try: plugin.autoend()
+ except: pass
+ except:
+ print "Directory", path, "contains a faulty plugin"
self.menuUpdate()
return list