1
0
Fork 0

added new field separators for DMRIds.dat-file

now the files can be separated with " ", ";", "," or "\t" that is tabulator
Format of file must be:
first field = id
second field = callsign
following fields with name, QTH etc will be ignored
main
Kim Huebel 4 years ago
parent 261f7607b5
commit da1211bbb2

@ -183,9 +183,18 @@ def main():
raise ValueError('File not found', format(dmr_id_lookupfile))
f = open(dmr_id_lookupfile, 'r')
lines = f.readlines()
lines = f.readlines()
separator = "\t"
for line in lines:
tokens = line.split("\t")
if line.find(" "):
separator = " "
if line.find(";"):
separator = ";"
if line.find(","):
separator = ","
if line.find("\t"):
separator = "\t"
tokens = line.split(separator)
dmrids[tokens[0]] = tokens[1]
logging.info("Starting Websocketserver")

Loading…
Cancel
Save