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
pull/604/head
Ben Busby 2 years ago
parent b745460a87
commit 6d9df65d02
No known key found for this signature in database
GPG Key ID: B9B7231E01D924A1

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

Loading…
Cancel
Save