# HG changeset patch # User David Douard # Date 1478098779 -3600 # Node ID b455460630a06212aa87e74fa64909e7e81c167d # Parent f1911a4638af6fb54e69f475d39c9dc8bb6cc082 [config] fix the load_site_cubicweb() method for to 'new-style' cubes (closes #16059402) We first try to load the site_cubicweb module from the cubicweb_ package, and if it fails, revert back to old cube path. diff -r f1911a4638af -r b455460630a0 cubicweb/cwconfig.py --- a/cubicweb/cwconfig.py Thu Oct 13 15:31:02 2016 +0200 +++ b/cubicweb/cwconfig.py Wed Nov 02 15:59:39 2016 +0100 @@ -843,7 +843,13 @@ def _load_site_cubicweb(self, cube): """Load site_cubicweb.py from `cube` (or apphome if cube is None).""" if cube is not None: - modname = 'cubes.%s.site_cubicweb' % cube + try: + modname = 'cubicweb_%s' % cube + __import__(modname) + except ImportError: + modname = 'cubes.%s' % cube + __import__(modname) + modname = modname + '.site_cubicweb' __import__(modname) return sys.modules[modname] else: