Commit a00625b0 authored by juga's avatar juga Committed by Matt Traudt
Browse files

Check that there are exits

to perform usability tests. This will avoid raising IndexError
when choosing an exit.
parent d1537ac6
......@@ -186,6 +186,9 @@ class DestinationList:
possible_exits = sorted(
possible_exits, key=lambda e: e.bandwidth, reverse=True)
exits = possible_exits[0:num_keep]
if len(exits) < 1:
log.warning("There are no exits to perform usability tests.")
continue
# Try three times to build a circuit to test this destination
circ_id = None
for _ in range(0, 3):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment