vregistry.py
branchtls-sprint
changeset 736 18c940e3f98d
parent 735 d22baa02cbaa
child 739 39721e56b56d
--- a/vregistry.py	Wed Feb 18 00:22:47 2009 +0100
+++ b/vregistry.py	Wed Feb 18 00:30:55 2009 +0100
@@ -131,12 +131,15 @@
         """returns a unique identifier for the vobject"""
         return '%s.%s' % (cls.__module__, cls.__name__)
 
+    # XXX bw compat code
     @classmethod
     def build___select__(cls):
         classdict = cls.__dict__
-        if '__select__' in classdict and '__selectors__' in classdict:
-            raise TypeError("__select__ and __selectors__ can't be used together")
+        if ('__select__' in classdict and '__selectors__' in classdict
+            and not '__selgenerated__' in classdict):
+            raise TypeError("__select__ and __selectors__ can't be used together on class %s" % cls)
         if '__selectors__' in classdict:
+            cls.__selgenerated__ = True
             # case where __selectors__ is defined locally (but __select__
             # is in a parent class)
             selectors = classdict['__selectors__']