1
0
mirror of https://github.com/nmap/nmap.git synced 2026-02-08 06:26:33 +00:00

When ndiff gets a command-line option it doesn't understand, print just the

exception message rather than the whole exception tuple. This changes
./ndiff: ('option --foo not recognized', 'foo')
to
./ndiff: option --foo not recognized
This commit is contained in:
david
2009-01-23 21:03:13 +00:00
parent 3868ca873e
commit 4db82f9351

View File

@@ -689,7 +689,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], unicode(e))
print >> sys.stderr, u"%s: %s" % (sys.argv[0], e.msg)
sys.exit(1)
for o, a in opts:
if o == "-h" or o == "--help":