From 2a6500f31abebfd4e15e704ffb9560da81fffcf4 Mon Sep 17 00:00:00 2001 From: Graham Norbury Date: Sun, 22 Jul 2018 09:27:37 -0400 Subject: [PATCH] Restore ability to read blacklist/whitelist tgid's direct from trunk.tsv --- op25/gr-op25_repeater/apps/trunking.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/op25/gr-op25_repeater/apps/trunking.py b/op25/gr-op25_repeater/apps/trunking.py index be860b8c..66a134dc 100644 --- a/op25/gr-op25_repeater/apps/trunking.py +++ b/op25/gr-op25_repeater/apps/trunking.py @@ -575,6 +575,14 @@ def hunt_cc(self, curr_time): return False def get_int_dict(s): + # test below looks like it was meant to read a csv list from the config + # file directly, rather than from a separate file. Not sure if this is + # actually used anymore, and could break if whitelist/blacklist file + # path begins with a digit. + + if s[0].isdigit(): + return dict.fromkeys([int(d) for d in s.split(',')]) + # create dict by reading from file d = {} # this is the dict with open(s,"r") as f: