diff options
author | 2012-01-07 23:58:28 +0100 | |
---|---|---|
committer | 2012-01-07 23:58:28 +0100 | |
commit | 6eaa7bb25e2254c80c43fe46166142d590e86c64 (patch) | |
tree | 103b12d2f8ca59cf84c7511018d99c3cb651839f /module/HookManager.py | |
parent | xfilesharingpro - fix patterns (diff) | |
download | pyload-6eaa7bb25e2254c80c43fe46166142d590e86c64.tar.xz |
some cleanups
Diffstat (limited to 'module/HookManager.py')
-rw-r--r-- | module/HookManager.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/module/HookManager.py b/module/HookManager.py index 51bc706ca..b915341e3 100644 --- a/module/HookManager.py +++ b/module/HookManager.py @@ -26,7 +26,7 @@ from types import MethodType from module.threads.HookThread import HookThread from module.plugins.PluginManager import literal_eval -from utils import lock +from utils import lock, to_string class HookManager: """ Manages hooks, loading, unloading. """ @@ -207,17 +207,23 @@ class HookManager: if plugin.info: #copy and convert so str info[name] = dict( - [(x, str(y) if not isinstance(y, basestring) else y) for x, y in plugin.info.iteritems()]) + [(x, to_string(y)) for x, y in plugin.info.iteritems()]) return info def getInfo(self, plugin): info = {} if plugin in self.plugins and self.plugins[plugin].info: - info = dict([(x, str(y) if not isinstance(y, basestring) else y) + info = dict([(x, to_string(y)) for x, y in self.plugins[plugin].info.iteritems()]) return info + def addEventListener(self, plugin, func, event): + pass + + def addConfigHandler(self, plugin, func): + pass + def addEvent(self, *args): self.core.eventManager.addEvent(*args) |