]> SALOME platform Git repositories - tools/sat.git/commitdiff
Salome HOME
fix bug when sat is called with no arguments
authorSerge Rehbinder <serge.rehbinder@cea.fr>
Mon, 1 Feb 2016 09:19:41 +0000 (10:19 +0100)
committerSerge Rehbinder <serge.rehbinder@cea.fr>
Mon, 1 Feb 2016 09:19:41 +0000 (10:19 +0100)
src/salomeTools.py

index b640e425976a3183cb4c2e77315326c50b0b22d1..1ba2839ad9f3dd0dc26374a8fd06b8a85fca2e9b 100755 (executable)
@@ -232,7 +232,12 @@ if __name__ == "__main__":
     # Initialize the code that will be returned by the terminal command 
     code = 0
     (options, args) = parser.parse_args(sys.argv[1:])
-
+    
+    # no arguments : print general help
+    if len(args) == 0:
+        print_help()
+        sys.exit(0)
+    
     # instantiate the salomeTools class with correct options
     sat = salomeTools(' '.join(sys.argv[1:]))
     # the command called