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
This commit is contained in:
parent
261f7607b5
commit
da1211bbb2
1 changed files with 11 additions and 2 deletions
11
logtailer.py
11
logtailer.py
|
@ -184,8 +184,17 @@ def main():
|
|||
|
||||
f = open(dmr_id_lookupfile, 'r')
|
||||
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…
Reference in a new issue