prevent some command providers to stop using cubicweb-ctl (current case : goactl when vobject is not there) 3.5
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Wed, 16 Sep 2009 18:14:43 +0200
branch3.5
changeset 3269 02a918f108a7
parent 3268 e9f4ea71e696
child 3270 ae43a0ddc1d9
prevent some command providers to stop using cubicweb-ctl (current case : goactl when vobject is not there)
cwconfig.py
--- a/cwconfig.py	Wed Sep 16 17:52:54 2009 +0200
+++ b/cwconfig.py	Wed Sep 16 18:14:43 2009 +0200
@@ -392,7 +392,11 @@
                         'server/serverctl.py', 'hercule.py',
                         'devtools/devctl.py', 'goa/goactl.py'):
             if exists(join(CW_SOFTWARE_ROOT, ctlfile)):
-                load_module_from_file(join(CW_SOFTWARE_ROOT, ctlfile))
+                try:
+                    load_module_from_file(join(CW_SOFTWARE_ROOT, ctlfile))
+                except ImportError, err:
+                    cls.warning('could not import the command provider %s (cause : %s)' %
+                                (ctlfile, err))
                 cls.info('loaded cubicweb-ctl plugin %s', ctlfile)
         for cube in cls.available_cubes():
             pluginfile = join(cls.cube_dir(cube), 'ecplugin.py')