Skip to content
Snippets Groups Projects
Commit b703e6db authored by Pavel Kácha's avatar Pavel Kácha
Browse files

Argument parsing is now looser and silently ignores additional arguments (ADS...

Argument parsing is now looser and silently ignores additional arguments (ADS may add surplus empty strings)
parent b5692629
No related branches found
No related tags found
No related merge requests found
......@@ -38,11 +38,9 @@ def help(s=None, exitcode=0):
def get_opts():
try:
rawopts, args = getopt.getopt(sys.argv[1:], "", getopt_format)
rawopts, args = getopt.gnu_getopt(sys.argv[1:], "", getopt_format)
except getopt.GetoptError as err:
help(err, exitcode=2)
if args:
help("unknown arg %s" % ", ".join(args), exitcode=2)
rawopts = dict(rawopts)
if "--help" in rawopts:
help()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment