Ignore malformed entries in msgs.txt

This commit is contained in:
Juhani Haverinen 2015-09-05 17:12:50 +03:00
parent 6edccd5309
commit 6998c0d187
1 changed files with 1 additions and 1 deletions

View File

@ -78,7 +78,7 @@ def loadmessages():
for line in f:
while len(line) > 0 and line[-1] == '\n':
line = line[:-1]
if len(line) > 0:
if len(line.split('\t')) == 3:
receiver, sender, msg = line.split('\t')
if receiver not in msgs:
msgs[receiver] = []