Skip to content

Commit b809ec6

Browse files
committed
Make args_erroor less verbose.
This removes the arugment help from the output, making the error much easier to find. This solves ARMmbed#10090.
1 parent 2b4960b commit b809ec6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tools/utils.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,8 +339,7 @@ def args_error(parser, message):
339339
parser - the ArgumentParser object that parsed the command line
340340
message - what went wrong
341341
"""
342-
parser.error(message)
343-
sys.exit(2)
342+
parser.exit(status=2, message=message+'\n')
344343

345344

346345
def construct_enum(**enums):

0 commit comments

Comments
 (0)