Merge branch 'bugfix/useless-sessionlog-warning' into 'dev'

Remove a useless session.log warning

See merge request crafty-controller/crafty-4!338
This commit is contained in:
Iain Powrie 2022-06-13 21:36:41 +00:00
commit ecb7dd6177

View File

@ -1,3 +1,4 @@
import contextlib
import os
import re
import sys
@ -491,9 +492,10 @@ class Helpers:
# del any old session.lock file as this is a new session
try:
os.remove(session_log_file)
with contextlib.suppress(FileNotFoundError):
os.remove(session_log_file)
except Exception as e:
logger.error(f"Deleting Session.lock failed with error: {e}")
Console.error(f"Deleting logs/session.log failed with error: {e}")
@staticmethod
def get_time_as_string():