[vreg] ensure you can register an object from module not known yet.
This ease registration of arbitrary objects during testing.
--- a/vregistry.py Tue Jun 01 17:03:28 2010 +0200
+++ b/vregistry.py Tue Jun 01 17:29:49 2010 +0200
@@ -385,7 +385,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