chg: Increase recursion limit for big captures

pull/917/head
Raphaël Vinot 2024-05-16 13:32:56 +02:00
parent 123610faaf
commit 98f505b0ff
1 changed files with 1 additions and 1 deletions

View File

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