File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -578,10 +578,11 @@ def botnet_stop(self, group=None):
578578 # give the bots some time to terminate
579579 time .sleep (sleep_time )
580580 # update the botnet_status
581- for bot_id in stopped_but_still_running_bots :
582- botnet_status [bot_id ] = self .bot_status (bot_id )[1 ]
583- if botnet_status [bot_id ] in ['stopped' , 'disabled' ]:
584- stopped_but_still_running_bots .remove (bot_id )
581+ # only keep bots in the list which are not stopped already
582+ stopped_but_still_running_bots = list (filter (
583+ lambda bot_id : self .bot_status (bot_id )[1 ] not in ['stopped' , 'disabled' ],
584+ stopped_but_still_running_bots
585+ ))
585586
586587 # check if all bots are stopped -> no need to wait further
587588 if not stopped_but_still_running_bots :
You can’t perform that action at this time.
0 commit comments