From 9c1dc6ecb056a0c5144407fc9752037933bd180a Mon Sep 17 00:00:00 2001 From: dmiller Date: Wed, 5 Mar 2025 23:37:47 +0000 Subject: [PATCH] Remove unused Paths.nmap_dir. Was causing Zenmap to fail to launch if nmap was not in path --- zenmap/zenmapCore/Paths.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/zenmap/zenmapCore/Paths.py b/zenmap/zenmapCore/Paths.py index 7d8fae722..9f9273924 100644 --- a/zenmap/zenmapCore/Paths.py +++ b/zenmap/zenmapCore/Paths.py @@ -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