Salome HOME
Add an option to the log command in order to access the products compilation logs
[tools/sat.git] / commands / config.py
index 9023b0758acbccee193e76690e9109328a442b8a..cb5863f35064746a10ffa60b93ec6ecabdf6d694 100644 (file)
@@ -406,18 +406,22 @@ class ConfigManager:
                                         "There is an error in the file"
                                         " %s.pyconf.\n" % cfg.VARS.application))
                     do_merge = False
-            except:
+            except Exception as e:
                 if (not ('-e' in parser.parse_args()[1]) 
                                         or ('--edit' in parser.parse_args()[1]) 
                                         and command == 'config'):
+                    sys.stdout.write(src.printcolors.printcWarning("%s\n" % str(e)))
                     raise src.SatException(_("Error in configuration file:"
                                              " %(application)s.pyconf\n") % \
                         { 'application': application} )
                 else:
                     sys.stdout.write(src.printcolors.printcWarning(
-                                    "There is an error in the file"
-                                    " %s.pyconf. Opening the file with the"
-                                    " default viewer\n" % cfg.VARS.application))
+                                "There is an error in the file"
+                                " %s.pyconf. Opening the file with the"
+                                " default viewer\n" % cfg.VARS.application))
+                    sys.stdout.write("The error:"
+                                 " %s\n" % src.printcolors.printcWarning(
+                                                                      str(e)))
                     do_merge = False
 
             if do_merge: