From 4a33e10cc98a8c992933344a6a3834b5b60a24f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Wed, 8 Mar 2023 16:55:18 +0200 Subject: [PATCH] chg: force protocol 5 for pickles --- lookyloo/capturecache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lookyloo/capturecache.py b/lookyloo/capturecache.py index badddceb..df11f8c7 100644 --- a/lookyloo/capturecache.py +++ b/lookyloo/capturecache.py @@ -272,7 +272,7 @@ class CapturesIndex(Mapping): default_recursion_limit = sys.getrecursionlimit() sys.setrecursionlimit(int(default_recursion_limit * 1.1)) try: - pickle.dump(tree, _p) + pickle.dump(tree, _p, protocol=5) except RecursionError as e: raise NoValidHarFile(f'Tree too deep, probably a recursive refresh: {e}.\n Append /export to the URL to get the files.') sys.setrecursionlimit(default_recursion_limit)