Merge pull request #11908 from mhilbrunner/docstatus-flagerror

doc_status.py: Error message for unknown CLI flag, shebang change

[ci skip]
This commit is contained in:
Rémi Verschelde 2017-10-09 14:52:11 +02:00 committed by GitHub
commit cbeeba9c03
1 changed files with 16 additions and 12 deletions

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/env python
import fnmatch
import os
@ -297,6 +297,7 @@ input_class_list = []
merged_file = ""
for arg in sys.argv[1:]:
try:
if arg.startswith('--'):
flags[long_flags[arg[2:]]] = not flags[long_flags[arg[2:]]]
elif arg.startswith('-'):
@ -308,6 +309,9 @@ for arg in sys.argv[1:]:
input_file_list.append(os.path.join(arg, f));
else:
input_class_list.append(arg)
except KeyError:
print("Unknown command line flag: " + arg)
sys.exit(1)
if flags['i']:
for r in ['methods', 'constants', 'members', 'signals']: