summaryrefslogtreecommitdiffstats
path: root/pyload/interaction
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/interaction')
-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