No need to set the session log offset value if it's 0

This commit is contained in:
Veronica K. B. Olsen
2020-06-26 18:37:17 +02:00
parent b05d6f2dc1
commit 198836c261
3 changed files with 9 additions and 7 deletions
+2 -2
View File
@@ -401,8 +401,8 @@ class GuiSessionLog(QDialog):
with open(logFile, mode="r", encoding="utf8") as inFile:
for inLine in inFile:
if inLine.startswith("#"):
if inLine.startswith("# Initial:"):
self.wordOffset = int(inLine[11:].strip())
if inLine.startswith("# Offset"):
self.wordOffset = int(inLine[9:].strip())
logger.verbose(
"Initial word count when log was started is %d" % self.wordOffset
)