1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-07 15:09:01 +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:
david
2009-05-13 00:39:40 +00:00
parent e8f696571e
commit 67c34404f2

View File

@@ -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()