selectors.py
branchtls-sprint
changeset 737 2494e85319fe
parent 731 ac4a94e50b60
child 752 c0506c4a1e6c
--- 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