summaryrefslogtreecommitdiffstats
path: root/module/HookManager.py
diff options
context:
space:
mode:
authorGravatar spoob <spoob@gmx.de> 2010-01-26 22:10:09 +0100
committerGravatar spoob <spoob@gmx.de> 2010-01-26 22:10:09 +0100
commit7223256dbcbcad79b5edf0f71f525264903607f9 (patch)
tree12b35b26d77e55fd3c5102edd92b536d1e55f73c /module/HookManager.py
parentextended script support (diff)
downloadpyload-7223256dbcbcad79b5edf0f71f525264903607f9.tar.xz
Better Script Support
Diffstat (limited to 'module/HookManager.py')
-rw-r--r--module/HookManager.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/module/HookManager.py b/module/HookManager.py
index 5dbf41936..66a65acc8 100644
--- a/module/HookManager.py
+++ b/module/HookManager.py
@@ -43,17 +43,21 @@ class HookManager():
self.lock.acquire()
f = lambda x: False if x.startswith("#") or x.endswith("~") else True
- self.scripts = {}
+ self.scripts = {}
folder = join(self.core.path, "scripts")
- self.scripts['download_preparing'] = filter(f, listdir(join(folder, 'download_preparing')))
- self.scripts['download_finished'] = filter(f, listdir(join(folder, 'download_finished')))
- self.scripts['package_finished'] = filter(f, listdir(join(folder, 'package_finished')))
- self.scripts['before_reconnect'] = filter(f, listdir(join(folder, 'before_reconnect')))
+ self.scripts['download_preparing'] = filter(f, listdir(join(folder, 'download_preparing')))
+ self.scripts['download_finished'] = filter(f, listdir(join(folder, 'download_finished')))
+ self.scripts['package_finished'] = filter(f, listdir(join(folder, 'package_finished')))
+ self.scripts['before_reconnect'] = filter(f, listdir(join(folder, 'before_reconnect')))
self.scripts['after_reconnect'] = filter(f, listdir(join(folder, 'after_reconnect')))
- self.core.logger.info("Installed Scripts: %s" % str(self.scripts))
+ for script_type, script_name in self.scripts.iteritems():
+ if script_name != []:
+ self.logger.info("Installed %s Scripts: %s" % (script_type, ", ".join(script_name)))
+
+ #~ self.core.logger.info("Installed Scripts: %s" % str(self.scripts))
self.folder = folder