Skip to content

Commit 5ef8564

Browse files
committed
Merge pull request savon-noir#51 from klondi/master
Call the callback one last time.
2 parents 4b0dd0a + c79c8b0 commit 5ef8564

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

libnmap/process.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,9 @@ def ioreader_routine(proc_stdout, io_queue, data_pushed, producing):
331331
self.__nmap_tasks[self.current_task.name].progress = 100
332332
else:
333333
self.__state = self.FAILED
334+
# Call the callback one last time to signal the new state
335+
if self.__nmap_event_callback:
336+
self.__nmap_event_callback(self)
334337
return self.rc
335338

336339
def run_background(self):
@@ -355,8 +358,8 @@ def has_terminated(self):
355358
356359
:return: True if nmap process is not running anymore.
357360
"""
358-
return (self.state == self.DONE or self.state == self.FAILED
359-
or self.state == self.CANCELLED)
361+
return (self.state == self.DONE or self.state == self.FAILED or
362+
self.state == self.CANCELLED)
360363

361364
def has_failed(self):
362365
"""

0 commit comments

Comments
 (0)