selectors.py
branchstable
changeset 5281 d01a02d07a57
parent 5147 70181998897f
child 5302 dfd147de06b2
child 5306 763319a51e72
--- a/selectors.py	Thu Apr 15 14:29:58 2010 +0200
+++ b/selectors.py	Thu Apr 15 15:14:21 2010 +0200
@@ -202,7 +202,7 @@
 SELECTOR_LOGGER = logging.getLogger('cubicweb.selectors')
 TRACED_OIDS = None
 
-def _trace_selector(cls, ret):
+def _trace_selector(cls, selector, args, ret):
     # /!\ lltrace decorates pure function or __call__ method, this
     #     means argument order may be different
     if isinstance(cls, Selector):
@@ -225,7 +225,7 @@
     def traced(cls, *args, **kwargs):
         ret = selector(cls, *args, **kwargs)
         if TRACED_OIDS is not None:
-            _trace_selector(cls, ret)
+            _trace_selector(cls, selector, args, ret)
         return ret
     traced.__name__ = selector.__name__
     traced.__doc__ = selector.__doc__