mirror of
https://github.com/nmap/nmap.git
synced 2026-08-03 22:29:06 +00:00
Print the "Try -h for help" message when there's an option error in
addition to the error message getopt prints.
This commit is contained in:
parent
e8f696571e
commit
67c34404f2
1 changed files with 1 additions and 2 deletions
|
|
@ -994,8 +994,7 @@ def main():
|
|||
try:
|
||||
opts, input_filenames = getopt.gnu_getopt(sys.argv[1:], "hv", ["help", "text", "verbose", "xml"])
|
||||
except getopt.GetoptError, e:
|
||||
print >> sys.stderr, u"%s: %s" % (sys.argv[0], e.msg)
|
||||
sys.exit(1)
|
||||
usage_error(u"%s: %s" % (sys.argv[0], e.msg))
|
||||
for o, a in opts:
|
||||
if o == "-h" or o == "--help":
|
||||
usage()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue