[events manager] onevent decorator may be given extra arguments to give to em.bind
--- a/__init__.py Tue Mar 30 13:31:21 2010 +0200
+++ b/__init__.py Tue Mar 30 13:32:01 2010 +0200
@@ -112,7 +112,7 @@
CW_EVENT_MANAGER = CubicWebEventManager()
-def onevent(event):
+def onevent(event, *args, **kwargs):
"""decorator to ease event / callback binding
>>> from cubicweb import onevent
@@ -123,6 +123,6 @@
>>>
"""
def _decorator(func):
- CW_EVENT_MANAGER.bind(event, func)
+ CW_EVENT_MANAGER.bind(event, func, *args, **kwargs)
return func
return _decorator