From d9d3faf860524477de370334e6a8ef5c70c9fcdd Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Sat, 13 Aug 2022 23:14:17 +0100 Subject: [PATCH] Extra debugging for get_first_relay --- modules/helpers.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/helpers.py b/modules/helpers.py index 3c4efdf..3f5c145 100644 --- a/modules/helpers.py +++ b/modules/helpers.py @@ -1,6 +1,6 @@ import main from modules import chankeep - +from util.logging.debug import debug def get_first_relay(net): """ @@ -11,13 +11,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}") activeRelays = chankeep.getActiveRelays(net) + 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}") return main.IRCPool[name] return None