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 #577main
parent
b745460a87
commit
6d9df65d02
|
@ -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…
Reference in New Issue