check object has __registry__ attribute before call to register() stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 31 Aug 2009 09:57:45 +0200
branchstable
changeset 3054 8b3b243e308e
parent 3053 51f196c212d9
child 3055 06814d57514f
check object has __registry__ attribute before call to register()
vregistry.py
--- a/vregistry.py	Mon Aug 31 09:57:27 2009 +0200
+++ b/vregistry.py	Mon Aug 31 09:57:45 2009 +0200
@@ -284,10 +284,11 @@
                 if obj.__module__ != modname or obj in butclasses:
                     continue
                 oid = obj.id
+                registryname = obj.__registry__
             except AttributeError:
                 continue
             if oid and not '__abstract__' in obj.__dict__:
-                self.register(obj)
+                self.register(obj, registryname)
 
     def register(self, obj, registryname=None, oid=None, clear=False):
         """base method to add an object in the registry"""