From 731c6a2fd1c5bf7c8dab20b7ce7868ad26f549e0 Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Mon, 15 Aug 2022 00:29:08 +0100 Subject: [PATCH] Pass a list instead of listinfo --- modules/chankeep.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/chankeep.py b/modules/chankeep.py index 607dddb..7f955fe 100644 --- a/modules/chankeep.py +++ b/modules/chankeep.py @@ -306,6 +306,7 @@ def keepChannels(net, listinfo, mean, sigrelay, relay): if len(flist) > max_chans: max_chans = len(flist) - 1 chosen = sorted(flist, reverse=True, key=lambda x: x[1])[:max_chans] + chosen = [i[0] for i in chosen] debug(f"keepChannels() {net}: joining {len(chosen)}/{len(flist)} channels") trace(f"keepChannels() {net}: joining:{chosen}") @@ -321,7 +322,7 @@ def keepChannels(net, listinfo, mean, sigrelay, relay): if len(siglist) > max_chans: max_chans = len(siglist) - 1 chosen = sorted(siglist, reverse=True, key=lambda x: x[1])[:max_chans] - siglist = [i[0] for i in siglist] + chosen = [i[0] for i in chosen] debug(f"keepChannels() {net}: siglist:{siglist} max_chans:{max_chans} len_sig:{len(siglist)}") debug(f"keepChannels() {net}: joining {len(chosen)}/{len(siglist)} channels")