Fix repeating of bad hosts

We didn't skip bad hosts so it would loop forever.
This commit is contained in:
Joshua M. Boniface 2021-06-26 17:24:39 -04:00
parent 5f5c21d7ff
commit 59c267c079

View file

@ -168,6 +168,8 @@ def get_target_host():
lowest_count = 999
target_host = None
for rhost in remote_hosts:
if rhost["bad"]:
continue
if rhost["weighted_count"] < lowest_count:
lowest_count = rhost["weighted_count"]
target_host = rhost["name"]