1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-07 05:01:29 +00:00

Fix pep8 errors in all of zenmap

This commit is contained in:
dmiller
2015-12-11 23:11:47 +00:00
parent 24f5f35d3e
commit 3567d72b17
28 changed files with 282 additions and 275 deletions

View File

@@ -261,10 +261,11 @@ class NmapCommand(object):
os.kill(self.command_process.pid, SIGTERM)
for i in range(10):
sleep(0.5)
if self.command_process.poll() is not None: # Process has been TERMinated
if self.command_process.poll() is not None:
# Process has been TERMinated
break
else:
log.debug(">>> SIGTERM has not worked even after waiting for 5 seconds. Using SIGKILL.")
log.debug(">>> SIGTERM has not worked even after waiting for 5 seconds. Using SIGKILL.") # noqa
os.kill(self.command_process.pid, SIGKILL)
self.command_process.wait()
except: