Catch and ignore unpickling errors in pip installs
This seems to be caused by an odd behavior related to Flask sessions and instances of Whoogle installed via pip. I didn't investigate it too much, since catching and ignoring the result doesn't impact Whoogle functionality at all (configuration and session values persist as normal). Since this doesn't affect non-pip instances, I don't believe it to be a fault within Whoogle itself. Fixes #765main
parent
ef98d85dc5
commit
f22e5ac171
|
@ -81,7 +81,7 @@ def session_required(f):
|
|||
if isinstance(data, dict) and 'valid' in data:
|
||||
continue
|
||||
invalid_sessions.append(session_path)
|
||||
except (EOFError, FileNotFoundError):
|
||||
except (EOFError, FileNotFoundError, pickle.UnpicklingError):
|
||||
pass
|
||||
|
||||
for invalid_session in invalid_sessions:
|
||||
|
|
Loading…
Reference in New Issue