logic fix
This commit is contained in:
parent
c3be096bc3
commit
ac4bb8b675
1 changed files with 15 additions and 12 deletions
|
@ -757,7 +757,9 @@ timestamp, contact):
|
||||||
pos = pos + 1
|
pos = pos + 1
|
||||||
|
|
||||||
# line is [] if log file for jid is not a file (does not exist or dir)
|
# line is [] if log file for jid is not a file (does not exist or dir)
|
||||||
if line != []:
|
if line == []:
|
||||||
|
break
|
||||||
|
|
||||||
if (now - float(line[0][0]))/60 >= time_out:
|
if (now - float(line[0][0]))/60 >= time_out:
|
||||||
# stop looking for messages if we found something too old
|
# stop looking for messages if we found something too old
|
||||||
break
|
break
|
||||||
|
@ -769,6 +771,7 @@ timestamp, contact):
|
||||||
lines.append(line[0])
|
lines.append(line[0])
|
||||||
size = size + 1
|
size = size + 1
|
||||||
|
|
||||||
|
if lines != []:
|
||||||
lines.reverse()
|
lines.reverse()
|
||||||
|
|
||||||
for msg in lines:
|
for msg in lines:
|
||||||
|
|
Loading…
Add table
Reference in a new issue