Commit 3126878d authored by Guido Trotter's avatar Guido Trotter
Browse files

GenericMain, handle ParameterError from _ParseArgs

Before this case was not covered, and printed a stack trace.
Signed-off-by: default avatarGuido Trotter <>
Reviewed-by: default avatarIustin Pop <>
parent 8b46606c
......@@ -747,7 +747,13 @@ def GenericMain(commands, override=None, aliases=None):
if aliases is None:
aliases = {}
func, options, args = _ParseArgs(sys.argv, commands, aliases)
func, options, args = _ParseArgs(sys.argv, commands, aliases)
except errors.ParameterError, err:
result, err_msg = FormatError(err)
return 1
if func is None: # parse error
return 1
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment