Skip to content

Commit

Permalink
Restore ability to read blacklist/whitelist tgid's direct from trunk.tsv
Browse files Browse the repository at this point in the history
  • Loading branch information
boatbod committed Jul 22, 2018
1 parent 4f66bfa commit 2a6500f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions op25/gr-op25_repeater/apps/trunking.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 2a6500f

Please sign in to comment.