Fix initial non-existent/empty log issue
Fixes bug where on initial session there is no file, and thus no lines are read and one thus gets a index out of bounds error as lines is empty...
This commit is contained in:
parent
9fc2c0aebc
commit
911c0478ba
@ -160,6 +160,9 @@ class SessionParser(object):
|
||||
break
|
||||
lines.reverse()
|
||||
|
||||
if len(lines) == 0:
|
||||
lines.append("Initial Session");
|
||||
|
||||
self.last_session = lines
|
||||
self.last_session_id = hashlib.md5(lines[0].encode()).hexdigest()
|
||||
self.last_saved_session_id = self._get_last_saved_session_id()
|
||||
|
Loading…
x
Reference in New Issue
Block a user