mirror of
https://github.com/nmap/nmap.git
synced 2025-12-07 13:11:28 +00:00
Replace == and != with is and is not for comparisons with None
This commit is contained in:
@@ -326,12 +326,12 @@ class NmapCommand(object):
|
||||
subprocess completed successfully. If the subprocess terminated with an
|
||||
error an exception is raised. The scan must have been started with
|
||||
run_scan before calling this method."""
|
||||
if self.command_process == None:
|
||||
if self.command_process is None:
|
||||
raise Exception("Scan is not running yet!")
|
||||
|
||||
state = self.command_process.poll()
|
||||
|
||||
if state == None:
|
||||
if state is None:
|
||||
return True # True means that the process is still running
|
||||
elif state == 0:
|
||||
return False # False means that the process had a successful exit
|
||||
|
||||
Reference in New Issue
Block a user