From df4a37ea120077a0bc4c6f75c598e2d20af5068e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Mon, 26 Sep 2022 17:16:04 +0200 Subject: [PATCH] fix: Properly catch broken captures --- lookyloo/capturecache.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lookyloo/capturecache.py b/lookyloo/capturecache.py index c779261..ba76a80 100644 --- a/lookyloo/capturecache.py +++ b/lookyloo/capturecache.py @@ -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)