cwvreg.py
branchtls-sprint
changeset 1357 e5a97779c7fc
parent 1309 a4eb20f86cb0
child 1475 5c1ec97f317e
--- a/cwvreg.py	Wed Apr 15 14:06:08 2009 +0200
+++ b/cwvreg.py	Wed Apr 15 14:06:53 2009 +0200
@@ -122,11 +122,11 @@
                 return
             # remove vobjects that don't support any available interface
             implemented_interfaces = set()
-            for classes in self.get('etypes', {}).values():
-                for cls in classes:
-                    for iface in cls.__implements__:
-                        implemented_interfaces.update(iface.__mro__)
-                    implemented_interfaces.update(cls.__mro__)
+            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