cwvreg.py
branchtls-sprint
changeset 1509 c481f0125382
parent 1477 b056a49c16dc
child 1513 9655f6eec675
--- a/cwvreg.py	Tue Apr 28 16:22:00 2009 +0200
+++ b/cwvreg.py	Tue Apr 28 16:22:36 2009 +0200
@@ -117,25 +117,25 @@
             clear_cache(self, 'etype_class')
             # we may want to keep interface dependent objects (e.g.for i18n
             # catalog generation)
-            if not self.config.cleanup_interface_sobjects:
-                return
-            # remove vobjects that don't support any available interface
-            implemented_interfaces = set()
-            for etype in self.schema.entities():
-                cls = self.etype_class(etype)
-                for iface in cls.__implements__:
-                    implemented_interfaces.update(iface.__mro__)
-                implemented_interfaces.update(cls.__mro__)
-            for obj, ifaces in self._needs_iface.items():
-                ifaces = frozenset(isinstance(iface, basestring)
-                                   and iface in self.schema
-                                   and self.etype_class(iface)
-                                   or iface
-                                   for iface in ifaces)
-                if not ('Any' in ifaces or ifaces & implemented_interfaces):
-                    self.debug('kicking vobject %s (no implemented interface '
-                               'among %s)', obj, ifaces)
-                    self.unregister(obj)
+            if self.config.cleanup_interface_sobjects:
+                # remove vobjects that don't support any available interface
+                implemented_interfaces = set()
+                for etype in self.schema.entities():
+                    cls = self.etype_class(etype)
+                    for iface in cls.__implements__:
+                        implemented_interfaces.update(iface.__mro__)
+                    implemented_interfaces.update(cls.__mro__)
+                for obj, ifaces in self._needs_iface.items():
+                    ifaces = frozenset(isinstance(iface, basestring)
+                                       and iface in self.schema
+                                       and self.etype_class(iface)
+                                       or iface
+                                       for iface in ifaces)
+                    if not ('Any' in ifaces or ifaces & implemented_interfaces):
+                        self.debug('kicking vobject %s (no implemented '
+                                   'interface among %s)', obj, ifaces)
+                        self.unregister(obj)
+            print 'HOP', self.items()
             # clear needs_iface so we don't try to remove some not-anymore-in
             # objects on automatic reloading
             self._needs_iface.clear()