Ignore malformed entries in msgs.txt
This commit is contained in:
parent
6edccd5309
commit
6998c0d187
|
@ -78,7 +78,7 @@ def loadmessages():
|
||||||
for line in f:
|
for line in f:
|
||||||
while len(line) > 0 and line[-1] == '\n':
|
while len(line) > 0 and line[-1] == '\n':
|
||||||
line = line[:-1]
|
line = line[:-1]
|
||||||
if len(line) > 0:
|
if len(line.split('\t')) == 3:
|
||||||
receiver, sender, msg = line.split('\t')
|
receiver, sender, msg = line.split('\t')
|
||||||
if receiver not in msgs:
|
if receiver not in msgs:
|
||||||
msgs[receiver] = []
|
msgs[receiver] = []
|
||||||
|
|
Loading…
Reference in New Issue