fix FileReader from not completing
This commit is contained in:
parent
0340b25733
commit
a6bc66667b
@ -64,8 +64,11 @@ class FileReader(object):
|
|||||||
with open(self._file, "rb") as file_handle:
|
with open(self._file, "rb") as file_handle:
|
||||||
while True:
|
while True:
|
||||||
data = file_handle.readline()
|
data = file_handle.readline()
|
||||||
str = data.decode()
|
|
||||||
self.telegram_buffer.append(str)
|
if not data:
|
||||||
|
break
|
||||||
|
|
||||||
|
self.telegram_buffer.append(data.decode())
|
||||||
|
|
||||||
for telegram in self.telegram_buffer.get_all():
|
for telegram in self.telegram_buffer.get_all():
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user