fix: Properly catch broken captures

pull/526/head
Raphaël Vinot 2022-09-26 17:16:04 +02:00
parent 8687d8fabf
commit df4a37ea12
1 changed files with 2 additions and 0 deletions

View File

@ -246,6 +246,8 @@ class CapturesIndex(Mapping):
try:
tree = load_pickle_tree(capture_dir, capture_dir.stat().st_mtime)
except NoValidHarFile:
self.logger.warning('Unable to rebuild the tree, the HAR files are broken.')
except TreeNeedsRebuild:
try:
tree = self._create_pickle(capture_dir)