[cwconfig] Issue a warning when a "core" ctl plugin failed to load
authorDenis Laxalde <denis.laxalde@logilab.fr>
Fri, 27 Jan 2017 09:58:30 +0100
changeset 11944 5284fee68601
parent 11943 760deab5413e
child 11945 ef6b18c56b5a
[cwconfig] Issue a warning when a "core" ctl plugin failed to load This is often because of a missing dependency, the warning would indicate this hopefully.
cubicweb/cwconfig.py
--- a/cubicweb/cwconfig.py	Fri Jan 27 13:36:00 2017 +0100
+++ b/cubicweb/cwconfig.py	Fri Jan 27 09:58:30 2017 +0100
@@ -722,7 +722,9 @@
                        'devtools.devctl', 'pyramid.pyramidctl'):
             try:
                 __import__('cubicweb.%s' % ctlmod)
-            except ImportError:
+            except ImportError as exc:
+                cls.warning('failed to load cubicweb-ctl plugin %s (%s)',
+                            ctlmod, exc)
                 continue
             cls.info('loaded cubicweb-ctl plugin %s', ctlmod)
         for cube in cls.available_cubes():