mirror of
https://github.com/nmap/nmap.git
synced 2026-09-21 15:46:45 +00:00
Update Ndiff to Python 3. Closes #1807
This commit is contained in:
parent
24b26317c7
commit
12d41ec2cd
7 changed files with 325 additions and 329 deletions
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# Ndiff
|
||||
#
|
||||
|
|
@ -66,15 +66,15 @@ if INSTALL_LIB is not None and is_secure_dir(INSTALL_LIB):
|
|||
|
||||
try:
|
||||
import ndiff
|
||||
except ImportError, e:
|
||||
print >> sys.stderr, """\
|
||||
except ImportError as e:
|
||||
print("""\
|
||||
Could not import the ndiff module: %s.
|
||||
I checked in these directories:""" % repr(e.message)
|
||||
I checked in these directories:""" % repr(e), file=sys.stderr)
|
||||
for dir in sys.path:
|
||||
print >> sys.stderr, " %s" % dir
|
||||
print >> sys.stderr, """\
|
||||
print(" %s" % dir, file=sys.stderr)
|
||||
print("""\
|
||||
If you installed Ndiff in another directory, you may have to add the
|
||||
modules directory to the PYTHONPATH environment variable."""
|
||||
modules directory to the PYTHONPATH environment variable.""", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
import ndiff
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue