Skip to content

Commit

Permalink
Merge pull request #51 from klondi/master
Browse files Browse the repository at this point in the history
Call the callback one last time.
  • Loading branch information
savon-noir committed Mar 3, 2015
2 parents 4b0dd0a + c79c8b0 commit 5ef8564
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions libnmap/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,9 @@ def ioreader_routine(proc_stdout, io_queue, data_pushed, producing):
self.__nmap_tasks[self.current_task.name].progress = 100
else:
self.__state = self.FAILED
# Call the callback one last time to signal the new state
if self.__nmap_event_callback:
self.__nmap_event_callback(self)
return self.rc

def run_background(self):
Expand All @@ -355,8 +358,8 @@ def has_terminated(self):
:return: True if nmap process is not running anymore.
"""
return (self.state == self.DONE or self.state == self.FAILED
or self.state == self.CANCELLED)
return (self.state == self.DONE or self.state == self.FAILED or
self.state == self.CANCELLED)

def has_failed(self):
"""
Expand Down

0 comments on commit 5ef8564

Please sign in to comment.