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 #765
このコミットが含まれているのは:
Ben Busby 2022-06-03 14:29:57 -06:00
コミット f22e5ac171
この署名に対応する既知のキーがデータベースに存在しません
GPGキーID: B9B7231E01D924A1
1個のファイルの変更1行の追加1行の削除

ファイルの表示

@ -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: