1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-09 06:01:28 +00:00

Fix calling Ndiff from Zenmap on OS X. http://seclists.org/nmap-dev/2016/q3/266

This commit is contained in:
dmiller
2016-09-09 00:53:45 +00:00
parent 0790885360
commit f607178541
2 changed files with 9 additions and 3 deletions

View File

@@ -166,11 +166,11 @@ class NdiffCommand(subprocess.Popen):
search_paths = get_path()
env = dict(os.environ)
env["PATH"] = search_paths
if getattr(sys, "frozen", None) == "macosx_app":
# These variables are set by py2app, but they can interfere with
if "Zenmap.app" in sys.executable:
# These vars are set by the launcher, but they can interfere with
# Ndiff because Ndiff is also a Python application. Without
# removing these, Ndiff will attempt to run using the
# py2app-bundled Python library, and may run into version or
# bundled Python library, and may run into version or
# architecture mismatches.
if "PYTHONPATH" in env:
del env["PYTHONPATH"]