cwvreg.py
branchstable
changeset 6037 1b4ea3ebdf80
parent 6014 a5e22657f6f4
child 6046 3fd4a34c4a09
--- a/cwvreg.py	Thu Jul 29 14:46:29 2010 +0200
+++ b/cwvreg.py	Fri Jul 30 09:52:12 2010 +0200
@@ -205,7 +205,7 @@
                       ObjectNotFound, NoSelectableObject, RegistryNotFound,
                       CW_EVENT_MANAGER)
 from cubicweb.utils import dump_class
-from cubicweb.vregistry import VRegistry, Registry, class_regid
+from cubicweb.vregistry import VRegistry, Registry, class_regid, classid
 from cubicweb.rtags import RTAGS
 
 def clear_rtag_objects():
@@ -617,7 +617,7 @@
                                    for iface in ifaces)
                 if not ('Any' in ifaces or ifaces & implemented_interfaces):
                     self.debug('unregister %s (no implemented '
-                               'interface among %s)', obj, ifaces)
+                               'interface among %s)', classid(obj), ifaces)
                     self.unregister(obj)
             # since 3.9: remove appobjects which depending on other, unexistant
             # appobjects
@@ -625,7 +625,8 @@
                 try:
                     registry = self[regname]
                 except RegistryNotFound:
-                    self.debug('unregister %s (no registry %s)', obj, regname)
+                    self.debug('unregister %s (no registry %s)', classid(obj),
+                               regname)
                     self.unregister(obj)
                     continue
                 for regid in regids:
@@ -633,7 +634,7 @@
                         break
                 else:
                     self.debug('unregister %s (no %s object in registry %s)',
-                               obj, ' or '.join(regids), regname)
+                               classid(obj), ' or '.join(regids), regname)
                     self.unregister(obj)
         super(CubicWebVRegistry, self).initialization_completed()
         for rtag in RTAGS: