cwvreg.py
branchtls-sprint
changeset 1769 fb91d2b8a441
parent 1752 4b0b912ff5b7
child 1917 eaf6e0edc509
--- a/cwvreg.py	Wed May 13 08:41:23 2009 +0200
+++ b/cwvreg.py	Wed May 13 09:09:22 2009 +0200
@@ -5,6 +5,7 @@
 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
 """
 __docformat__ = "restructuredtext en"
+_ = unicode
 
 from logilab.common.decorators import cached, clear_cache
 
@@ -12,8 +13,8 @@
 
 from cubicweb import Binary, UnknownProperty, UnknownEid
 from cubicweb.vregistry import VRegistry, ObjectNotFound, NoSelectableObject
+from cubicweb.rtags import RTAGS
 
-_ = unicode
 
 def use_interfaces(obj):
     """return interfaces used by the given object by searchinf for implements
@@ -122,9 +123,10 @@
                 for appobjects in objects.itervalues():
                     for appobject in appobjects:
                         appobject.vreg_initialization_completed()
-            from cubicweb.rtags import RTAGS
+            # don't check rtags if we don't want to cleanup_interface_sobjects
             for rtag in RTAGS:
-                rtag.init(self.schema)
+                rtag.init(self.schema,
+                          check=self.config.cleanup_interface_sobjects)
 
     def initialization_completed(self):
         # clear etype cache if you don't want to run into deep weirdness