1
0
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:
dmiller
2014-01-09 16:47:20 +00:00
parent 96141b431e
commit 51b143353b
18 changed files with 61 additions and 64 deletions

View File

@@ -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