fix traced_selection tls-sprint
authorsylvain.thenault@logilab.fr
Wed, 18 Feb 2009 00:45:01 +0100
branchtls-sprint
changeset 737 2494e85319fe
parent 736 18c940e3f98d
child 738 9b8cb1976992
fix traced_selection
selectors.py
--- a/selectors.py	Wed Feb 18 00:30:55 2009 +0100
+++ b/selectors.py	Wed Feb 18 00:45:01 2009 +0100
@@ -67,16 +67,12 @@
     if CubicWebConfiguration.mode == 'installed':
         return selector
     def traced(cls, *args, **kwargs):
-        if isinstance(cls, Selector):
-            selname = cls.__class__.__name__
-            oid = args[0].id
-        else:
-            selname = selector.__name__
-            oid = cls.id
+        selname = cls.__class__.__name__
+        oid = args[0].id
         ret = selector(cls, *args, **kwargs)
         if TRACED_OIDS == 'all' or oid in TRACED_OIDS:
             #SELECTOR_LOGGER.warning('selector %s returned %s for %s', selname, ret, cls)
-            print 'selector %s returned %s for %s' % (selname, ret, cls)
+            print 'selector %s returned %s for %s' % (selname, ret, args[0])
         return ret
     traced.__name__ = selector.__name__
     return traced