Salome HOME
spns #26801 : bug sat package, le lanceur ne faisait pas le réinit
[tools/sat.git] / src / salomeTools.py
index 543baeabdf34cf032382ce824cdab6c11247dd4c..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)
@@ -707,7 +716,7 @@ def get_help():
     '''
     msg = "\n" + get_version() + "\n\n"
     msg += src.printcolors.printcHeader( _("Usage: ") ) + \
-          "sat [sat_options] <command> [product] [command_options]\n\n"
+          "sat [sat_options] <command> [application] [command_options]\n\n"
 
     msg += parser.get_help() + "\n"