Skip to content
Snippets Groups Projects
Commit 60c896df authored by Kien Le's avatar Kien Le
Browse files

Fix bug with some log files

Fix problem with log files that have more than one blank lines at the
end.
parent 7f370c5d
No related branches found
No related tags found
No related merge requests found
......@@ -122,6 +122,12 @@ class LogFile:
line = self.file.readline()
if line == '':
break
# If there are more than one blank lines at the end of a log file, the
# last packet will be empty. This causes problem if the log file came
# from rt2ms or SOHStationViewer.
if not packet:
self.file.close()
raise StopIteration
return packet
def __del__(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment