From 98f505b0ff5d9938cf7db120360f931f7c7d5a1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Thu, 16 May 2024 13:32:56 +0200 Subject: [PATCH] chg: Increase recursion limit for big captures --- lookyloo/capturecache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lookyloo/capturecache.py b/lookyloo/capturecache.py index 44f33736..ab590298 100644 --- a/lookyloo/capturecache.py +++ b/lookyloo/capturecache.py @@ -343,7 +343,7 @@ class CapturesIndex(Mapping): # type: ignore[type-arg] # Some pickles require a pretty high recursion limit, this kindof fixes it. # If the capture is really broken (generally a refresh to self), the capture # is discarded in the RecursionError above. - sys.setrecursionlimit(int(default_recursion_limit * 1.1)) + sys.setrecursionlimit(int(default_recursion_limit * 2)) try: with gzip.open(capture_dir / 'tree.pickle.gz', 'wb') as _p: _p.write(pickletools.optimize(pickle.dumps(tree, protocol=5)))