vregistry.py
branchtls-sprint
changeset 741 8c810ee593a3
parent 739 39721e56b56d
child 754 937f5feac7f0
child 759 e044f28372bd
--- a/vregistry.py	Wed Feb 18 00:55:13 2009 +0100
+++ b/vregistry.py	Wed Feb 18 00:55:42 2009 +0100
@@ -112,7 +112,7 @@
         may be the right hook to create an instance for example). By
         default the vobject is returned without any transformation.
         """
-        cls.__select__ = cls.build___select__()
+        cls.build___select__()
         return cls
 
     @classmethod
@@ -146,10 +146,11 @@
             if len(selectors) == 1:
                 # micro optimization: don't bother with AndSelector if there's
                 # only one selector
-                return _instantiate_selector(selectors[0])
-            return AndSelector(_instantiate_selector(selector)
-                               for selector in selectors)
-        return cls.__select__
+                select = _instantiate_selector(selectors[0])
+            else:
+                select = AndSelector(*[_instantiate_selector(selector)
+                                       for selector in selectors])
+            cls.__select__ = select
 
 
 class VRegistry(object):