Salome HOME
gestion de path multiples dans la configuration projet
[tools/sat.git] / src / salomeTools.py
index 3d4774e7b84dc5f9536b846ce6f8dbcd965664d3..a49524b24c465199efc051015dc06bed564dd2f7 100755 (executable)
@@ -348,7 +348,6 @@ class Sat(object):
         '''
         # loop on the commands name
         for nameCmd in lCommand:
-            DBG.write("load module command '%s.py'" % nameCmd, "")
             # Exception for the jobs command that requires the paramiko module
             if nameCmd == "jobs":
                 try:
@@ -481,8 +480,18 @@ class Sat(object):
                     if res is None:
                         res = 0
                         
+                except src.SatException as e:
+                    # for sat exception do not display the stack, unless debug mode is set
+                    logger_command.write("\n***** ", 1)
+                    logger_command.write(src.printcolors.printcError(
+                            "salomeTools ERROR: sat %s" % __nameCmd__), 1)
+                    logger_command.write(" *****\n", 1)
+                    print(e.message)
+                    if self.options.debug_mode:
+                        logger_command.write("\n" + DBG.format_exception("") + "\n", 1)
+
                 except Exception as e:
-                    # Get error
+                    # here we print the stack in addition
                     logger_command.write("\n***** ", 1)
                     logger_command.write(src.printcolors.printcError(
                             "salomeTools ERROR: sat %s" % __nameCmd__), 1)