aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components
diff options
context:
space:
mode:
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>2006-02-23 02:39:31 +0000
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>2006-02-23 02:39:31 +0000
commit08e972ae07f60852a888c93199319444e8c06714 (patch)
treedaaa0a68bd4229c70a59c5b7604f9d59d7ba9f0c /lib/python/Components
parent10194a885f07b7d024aa806515a13588263d71e7 (diff)
downloadenigma2-08e972ae07f60852a888c93199319444e8c06714.tar.gz
enigma2-08e972ae07f60852a888c93199319444e8c06714.zip
append, don't overwrite __init__.py files
reread plugin list revisited
Diffstat (limited to 'lib/python/Components')
-rw-r--r--lib/python/Components/PluginComponent.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/python/Components/PluginComponent.py b/lib/python/Components/PluginComponent.py
index f3cd7e1e..e55bbd4d 100644
--- a/lib/python/Components/PluginComponent.py
+++ b/lib/python/Components/PluginComponent.py
@@ -34,6 +34,11 @@ class PluginComponent:
if x == PluginDescriptor.WHERE_AUTOSTART:
plugin(reason=1)
+ def reReadPluginList(self, directory, depth = 1):
+ print "re-reading plugin list"
+ self.clearPluginList()
+ self.readPluginList(directory=directory, depth=depth)
+
def readPluginList(self, directory, modules = [], depth = 1):
"""enumerates plugins"""
@@ -59,7 +64,7 @@ class PluginComponent:
p.updateIcon(path)
self.addPlugin(p);
else:
- open(path + "__init__.py", "w").close()
+ open(path + "__init__.py", "a").close()
self.readPluginList(path, modules + [x], depth - 1)
def getPlugins(self, where):
@@ -75,6 +80,7 @@ class PluginComponent:
def clearPluginList(self):
self.pluginList = []
+ self.plugins = {}
def shutdown(self):
for p in self.pluginList[:]: