cwvreg.py
changeset 5562 4ccd599b5cf0
parent 5556 9ab2b4c74baf
child 5627 a7e40cccdc9b
--- a/cwvreg.py	Fri May 21 13:34:03 2010 +0200
+++ b/cwvreg.py	Fri May 21 13:34:52 2010 +0200
@@ -617,13 +617,18 @@
             # since 3.9: remove appobjects which depending on other, unexistant
             # appobjects
             for obj, (regname, regids) in self._needs_appobject.items():
-                registry = self[regname]
+                try:
+                    registry = self[regname]
+                except RegistryNotFound:
+                    self.debug('kicking %s (no registry %s)', obj, regname)
+                    self.unregister(obj)
+                    continue
                 for regid in regids:
                     if registry.get(regid):
                         break
                 else:
                     self.debug('kicking %s (no %s object in registry %s)',
-                               obj, ' or '.join(regids), registry)
+                               obj, ' or '.join(regids), regname)
                     self.unregister(obj)
         super(CubicWebVRegistry, self).initialization_completed()
         for rtag in RTAGS: