Skip to content

Commit

Permalink
chg: avoid trying to load a tree that is currenly being built
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafiot committed Oct 13, 2023
1 parent 74bc8fc commit 4143d5f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lookyloo/capturecache.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ def __init__(self, cache_entry: Dict[str, Any]):
def tree(self) -> CrawledTree:
if not self.capture_dir.exists():
raise MissingCaptureDirectory(f'The capture {self.uuid} does not exists in {self.capture_dir}.')
while is_locked(self.capture_dir):
time.sleep(5)
return load_pickle_tree(self.capture_dir, self.capture_dir.stat().st_mtime, self.logger)


Expand Down

0 comments on commit 4143d5f

Please sign in to comment.