mirror of https://github.com/CIRCL/lookyloo
chg: Always make sure the lock file is removed even if building the tree fails
parent
7f221c8b9e
commit
17af2df5cd
|
@ -194,7 +194,7 @@ class Lookyloo():
|
|||
raise NoValidHarFile(e.message)
|
||||
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.')
|
||||
|
||||
else:
|
||||
with pickle_file.open('wb') as _p:
|
||||
# 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
|
||||
|
@ -203,6 +203,7 @@ class Lookyloo():
|
|||
sys.setrecursionlimit(int(default_recursion_limit * 1.1))
|
||||
pickle.dump(ct, _p)
|
||||
sys.setrecursionlimit(default_recursion_limit)
|
||||
finally:
|
||||
lock_file.unlink(missing_ok=True)
|
||||
return ct
|
||||
|
||||
|
|
Loading…
Reference in New Issue