[vreg] fix traced_selection stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 15 Apr 2010 15:14:21 +0200
branchstable
changeset 5281 d01a02d07a57
parent 5280 7e13bb484a19
child 5282 d7f72547208e
[vreg] fix traced_selection
selectors.py
--- 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__