Salome HOME
Add info option to config command
authorSerge Rehbinder <serge.rehbinder@cea.fr>
Mon, 6 Jun 2016 14:42:20 +0000 (16:42 +0200)
committerSerge Rehbinder <serge.rehbinder@cea.fr>
Mon, 6 Jun 2016 14:42:20 +0000 (16:42 +0200)
commands/config.py

index e6f59eecb421553cbe0547b5d9c2a900dd3e624d..13cc4532764aad7970db6c2ecbcc50a070855aac 100644 (file)
@@ -421,7 +421,8 @@ class ConfigManager:
 def check_path(path, ext=[]):
     # check if file exists
     if not os.path.exists(path):
-        return "'%s'" % path + " " + src.printcolors.printcError(_("** not found"))
+        return "'%s'" % path + " " + src.printcolors.printcError(_(
+                                                            "** not found"))
 
     # check extension
     if len(ext) > 0:
@@ -648,6 +649,7 @@ def run(args, runner, logger):
     
     # case : give information about the product in parameter
     elif options.info:
+        src.check_config_has_application(runner.cfg)
         if options.info in runner.cfg.APPLICATION.products:
             show_product_info(runner.cfg, options.info, logger)
             return