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"""
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):
def clearPluginList(self):
self.pluginList = []
+ self.plugins = {}
def shutdown(self):
for p in self.pluginList[:]:
self.container.execute("ipkg update")
def installFinished(self):
- plugins.clearPluginList()
- plugins.readPluginList(resolveFilename(SCOPE_PLUGINS))
+ plugins.reReadPluginList(resolveFilename(SCOPE_PLUGINS))
self.close()
def runFinished(self, retval):