Catch `FileNotFound` when clearing invalid sessions

The server now consumes the FNF error if an invalid session is found but
is deleted in an earlier thread.

Fixes #577
main
Ben Busby 2021-12-21 14:03:24 -07:00
parent b745460a87
commit 6d9df65d02
No known key found for this signature in database
GPG Key ID: B9B7231E01D924A1
1 changed files with 5 additions and 1 deletions

View File

@ -85,7 +85,11 @@ def session_required(f):
pass
for invalid_session in invalid_sessions:
try:
os.remove(invalid_session)
except FileNotFoundError:
# Don't throw error if the invalid session has been removed
pass
return f(*args, **kwargs)