selectors.py
branchtls-sprint
changeset 1037 1f3fae8d82b2
parent 1011 22812cfe36b4
child 1132 96752791c2b6
--- a/selectors.py	Tue Mar 10 19:35:38 2009 +0100
+++ b/selectors.py	Tue Mar 10 19:36:16 2009 +0100
@@ -522,7 +522,10 @@
         for iface in self.expected_ifaces:
             if isinstance(iface, basestring):
                 # entity type
-                iface = eclass.vreg.etype_class(iface)
+                try:
+                    iface = eclass.vreg.etype_class(iface)
+                except KeyError:
+                    continue # entity type not in the schema
             if implements_iface(eclass, iface):
                 if getattr(iface, '__registry__', None) == 'etypes':
                     # adjust score if the interface is an entity class