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

Remove unused Paths.nmap_dir. Was causing Zenmap to fail to launch if nmap was not in path

This commit is contained in:
dmiller
2025-03-05 23:37:47 +00:00
parent 12f2f1e592
commit 9c1dc6ecb0

View File

@@ -116,15 +116,6 @@ class Paths(object):
self.misc_dir = MISC_DIR
self.docs_dir = DOCS_DIR
self._delayed_incomplete = True
PATH = os.environ.get('PATH', os.defpath)
extra = get_extra_executable_search_paths()
if extra:
PATH += ';' + ';'.join(extra)
NMAPPATH = dirname(shutil.which("nmap", path=PATH))
if sys.platform == 'win32':
self.nmap_dir = NMAPPATH
else:
self.nmap_dir = join(NMAPPATH, "..", "share", "nmap")
# Delay initializing these paths so that
# zenmapCore.I18N.install_gettext can install _() before modules that