vregistry.py
changeset 5655 ef903fff826d
parent 5627 a7e40cccdc9b
parent 5651 95f7285e85e2
child 5696 98d390c28edb
--- a/vregistry.py	Tue Jun 01 17:06:41 2010 +0200
+++ b/vregistry.py	Thu Jun 03 10:17:44 2010 +0200
@@ -375,7 +375,7 @@
             registry.register(obj, oid=oid, clear=clear)
             self.debug('registered appobject %s in registry %s with id %s',
                        vname, registryname, oid or class_regid(obj))
-        self._loadedmods[obj.__module__][classid(obj)] = obj
+        self._loadedmods.setdefault(obj.__module__, {})[classid(obj)] = obj
 
     def unregister(self, obj, registryname=None):
         """unregister `obj` application object from the registry `registryname` or