[cwconfig] Add "pyramid" config type to MCOMPAT dict 3.25
authorDenis Laxalde <denis.laxalde@logilab.fr>
Fri, 07 Apr 2017 14:31:41 +0200
branch3.25
changeset 12138 10a18c6c5e10
parent 12137 4db0f2251960
child 12139 b5be819872bb
[cwconfig] Add "pyramid" config type to MCOMPAT dict I don't know what this is for exactly, but the accept_mode method below queries this dict with the configuration type name. And if the latter is "pyramid", it crashes since there's no key in MCOMPAT dict. So add one with the same value as "all-in-one". This code is called during "upgrade" migration in particular.
cubicweb/cwconfig.py
--- a/cubicweb/cwconfig.py	Fri Apr 07 15:23:38 2017 +0200
+++ b/cubicweb/cwconfig.py	Fri Apr 07 14:31:41 2017 +0200
@@ -1060,6 +1060,7 @@
 
     MODES = ('common', 'repository', 'Any')
     MCOMPAT = {'all-in-one': MODES,
+               'pyramid': MODES,
                'repository': ('common', 'repository', 'Any')}
     @classmethod
     def accept_mode(cls, mode):