From 4250a898f546afaa1672c46502ba27b92a10df66 Mon Sep 17 00:00:00 2001 From: Serge Rehbinder Date: Mon, 1 Feb 2016 10:19:41 +0100 Subject: [PATCH] fix bug when sat is called with no arguments --- src/salomeTools.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -- 2.39.2