mirror of
https://github.com/nmap/nmap.git
synced 2025-12-07 05:01:29 +00:00
Also handle subclasses of OSError when running an executable.
We checked for OSError so that we could give a useful custom error message on ENOENT. But on Windows, it is a WindowsError, which is a subclass of OSError.
This commit is contained in:
@@ -480,7 +480,7 @@ or type the nmap command you would like to execute."),
|
||||
command_execution.run_scan()
|
||||
except Exception, e:
|
||||
text = str(e)
|
||||
if type(e) == OSError:
|
||||
if isinstance(e, OSError):
|
||||
# Handle ENOENT specially.
|
||||
if e.errno == errno.ENOENT:
|
||||
# nmap_command_path comes from zenmapCore.NmapCommand.
|
||||
|
||||
Reference in New Issue
Block a user