From: Serge Rehbinder Date: Mon, 1 Feb 2016 09:19:41 +0000 (+0100) Subject: fix bug when sat is called with no arguments X-Git-Tag: sprint-01~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4250a898f546afaa1672c46502ba27b92a10df66;p=tools%2Fsat.git fix bug when sat is called with no arguments --- diff --git a/src/salomeTools.py b/src/salomeTools.py index b640e42..1ba2839 100755 --- a/src/salomeTools.py +++ b/src/salomeTools.py @@ -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