mirror of https://github.com/CIRCL/lookyloo
chg: Increase recursion limit for big captures
parent
123610faaf
commit
98f505b0ff
|
@ -343,7 +343,7 @@ class CapturesIndex(Mapping): # type: ignore[type-arg]
|
||||||
# Some pickles require a pretty high recursion limit, this kindof fixes it.
|
# 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
|
# If the capture is really broken (generally a refresh to self), the capture
|
||||||
# is discarded in the RecursionError above.
|
# is discarded in the RecursionError above.
|
||||||
sys.setrecursionlimit(int(default_recursion_limit * 1.1))
|
sys.setrecursionlimit(int(default_recursion_limit * 2))
|
||||||
try:
|
try:
|
||||||
with gzip.open(capture_dir / 'tree.pickle.gz', 'wb') as _p:
|
with gzip.open(capture_dir / 'tree.pickle.gz', 'wb') as _p:
|
||||||
_p.write(pickletools.optimize(pickle.dumps(tree, protocol=5)))
|
_p.write(pickletools.optimize(pickle.dumps(tree, protocol=5)))
|
||||||
|
|
Loading…
Reference in New Issue