[pyramid/core] drop fallback import of legacy cubes
authorPhilippe Pepiot <philippe.pepiot@logilab.fr>
Thu, 28 Mar 2019 11:00:55 +0100
changeset 12550 c6f832df2f34
parent 12549 e2db422752b4
child 12551 f794c496e6a4
[pyramid/core] drop fallback import of legacy cubes
cubicweb/pyramid/core.py
--- a/cubicweb/pyramid/core.py	Thu Mar 28 10:33:54 2019 +0100
+++ b/cubicweb/pyramid/core.py	Thu Mar 28 11:00:55 2019 +0100
@@ -398,12 +398,7 @@
 
     cwcfg = config.registry['cubicweb.config']
     for cube in cwcfg.cubes():
-        try:
-            pkgname = 'cubicweb_{}'.format(cube)
-            mod = __import__(pkgname)
-        except ImportError:
-            pkgname = 'cubes.{}'.format(cube)
-            mod = __import__(pkgname)
-            mod = getattr(mod, cube)
+        pkgname = 'cubicweb_{}'.format(cube)
+        mod = __import__(pkgname)
         if hasattr(mod, 'includeme'):
             config.include(pkgname)