aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Plugins/tuxboxplugins
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/Plugins/tuxboxplugins
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/Plugins/tuxboxplugins')
-rw-r--r--lib/python/Plugins/tuxboxplugins/plugin.py42
1 files changed, 26 insertions, 16 deletions
diff --git a/lib/python/Plugins/tuxboxplugins/plugin.py b/lib/python/Plugins/tuxboxplugins/plugin.py
index b7005662..bf789465 100644
--- a/lib/python/Plugins/tuxboxplugins/plugin.py
+++ b/lib/python/Plugins/tuxboxplugins/plugin.py
@@ -7,31 +7,41 @@ from Components.Label import Label
import os
def getPlugins():
- dir = os.listdir("/usr/lib/tuxbox/plugins/")
-
pluginlist = []
- for x in dir:
- try:
- if x[-3:] == "cfg":
- params = getPluginParams(x)
- pluginlist.append((params["name"], params["desc"], "function", "main", x))
- except:
- pass
+
+ try:
+ dir = os.listdir("/usr/lib/tuxbox/plugins/")
+
+ for x in dir:
+ try:
+ if x[-3:] == "cfg":
+ params = getPluginParams(x)
+ pluginlist.append((params["name"], params["desc"], "function", "main", x))
+ except:
+ pass
+ except:
+ print "no tuxbox plugins found"
return pluginlist
def getPicturePaths():
list = []
- dir = os.listdir("/usr/lib/tuxbox/plugins/")
- for x in dir: list.append("tuxbox.png")
+ try:
+ dir = os.listdir("/usr/lib/tuxbox/plugins/")
+ for x in dir: list.append("tuxbox.png")
+ except:
+ print "no tuxbox plugins found"
return list
def getPluginParams(file):
params = {}
- file = open("/usr/lib/tuxbox/plugins/" + file, "r")
- for x in file.readlines():
- split = x.split("=")
- params[split[0]] = split[1]
- file.close()
+ try:
+ file = open("/usr/lib/tuxbox/plugins/" + file, "r")
+ for x in file.readlines():
+ split = x.split("=")
+ params[split[0]] = split[1]
+ file.close()
+ except:
+ print "not tuxbox plugins found"
return params