[hooks/syncschema] do not crash if the schema did not learn (yet) some new META rtype (closes #2171313) stable
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Fri, 03 Feb 2012 14:32:11 +0100
branchstable
changeset 8192 0067653190c7
parent 8191 eceaf9e21966
child 8193 0c64d6b75303
[hooks/syncschema] do not crash if the schema did not learn (yet) some new META rtype (closes #2171313)
hooks/syncschema.py
--- a/hooks/syncschema.py	Thu Feb 02 17:59:52 2012 +0100
+++ b/hooks/syncschema.py	Fri Feb 03 14:32:11 2012 +0100
@@ -268,9 +268,8 @@
             try:
                 rschema = schema[rtype]
             except KeyError:
-                if rtype == 'cw_source':
-                    continue # XXX 3.10 migration
-                raise
+                self.critical('rtype %s was not handled at cwetype creation time', rtype)
+                continue
             sampletype = rschema.subjects()[0]
             desttype = rschema.objects()[0]
             rdef = copy(rschema.rdef(sampletype, desttype))