summaryrefslogtreecommitdiffstats
path: root/pyload/interaction/EventManager.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-08-18 17:01:17 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-08-18 17:01:17 +0200
commit9a6ea22616cf3cc67e292c908521b79764400faf (patch)
tree1924843f28d992490d867d0557da90dfb1da6404 /pyload/interaction/EventManager.py
parentfixed login (diff)
downloadpyload-9a6ea22616cf3cc67e292c908521b79764400faf.tar.xz
new linkgrabber
Diffstat (limited to 'pyload/interaction/EventManager.py')
-rw-r--r--pyload/interaction/EventManager.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/pyload/interaction/EventManager.py b/pyload/interaction/EventManager.py
index 329961d93..8cc1e81d2 100644
--- a/pyload/interaction/EventManager.py
+++ b/pyload/interaction/EventManager.py
@@ -55,23 +55,21 @@ class EventManager:
if func in events:
events.remove(func)
- def dispatchEvent(self, event, *args):
+ def dispatchEvent(self, event, *args, **kwargs):
"""dispatches event with args"""
for f in self.events["event"]:
try:
- f(event, *args)
+ f(event, *args, **kwargs)
except Exception, e:
self.log.warning("Error calling event handler %s: %s, %s, %s"
% ("event", f, args, str(e)))
- if self.core.debug:
- print_exc()
+ self.core.print_exc()
if event in self.events:
for f in self.events[event]:
try:
- f(*args)
+ f(*args, **kwargs)
except Exception, e:
self.log.warning("Error calling event handler %s: %s, %s, %s"
% (event, f, args, str(e)))
- if self.core.debug:
- print_exc() \ No newline at end of file
+ self.core.print_exc() \ No newline at end of file