More debugging for reg tests and getstr command

This commit is contained in:
2022-08-14 11:41:29 +01:00
parent 39059084ef
commit 0b20a05b19
6 changed files with 66 additions and 19 deletions

View File

@@ -12,16 +12,16 @@ def get_first_relay(net):
"""
cur_relay = 0
max_relay = len(main.network[net].relays.keys()) + 1
debug(f"get_first_relay() {net}: max_relay:{max_relay}")
# debug(f"get_first_relay() {net}: max_relay:{max_relay}")
activeRelays = chankeep.getActiveRelays(net)
debug(f"get_first_relay() {net}: activeRelays:{activeRelays}")
# debug(f"get_first_relay() {net}: activeRelays:{activeRelays}")
while cur_relay != max_relay:
cur_relay += 1
if cur_relay not in activeRelays:
continue
name = net + str(cur_relay)
if name in main.IRCPool.keys():
debug(f"get_first_relay() {net}: found relay {name}")
# debug(f"get_first_relay() {net}: found relay {name}")
return main.IRCPool[name]
return None