From da33a7f5b33918ac00feb3107e633c4dc7a5ff9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Fri, 23 Sep 2022 14:46:19 +0200 Subject: [PATCH] chg: Avoid stacktrace when trying to generate broken capture --- bin/background_indexer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/background_indexer.py b/bin/background_indexer.py index b920a12f..3b5adddf 100755 --- a/bin/background_indexer.py +++ b/bin/background_indexer.py @@ -58,8 +58,8 @@ class BackgroundIndexer(AbstractManager): self.logger.info(f'Pickle for {uuid} build.') except MissingUUID: self.logger.warning(f'Unable to find {uuid}. That should not happen.') - except NoValidHarFile: - self.logger.exception(f'Unable to build pickle for {uuid}: {uuid_path.parent.name}') + except NoValidHarFile as e: + self.logger.critical(f'Unable to build pickle for {uuid}: {uuid_path.parent.name} - {e}') # The capture is not working, moving it away. self.lookyloo.redis.hdel('lookup_dirs', uuid) shutil.move(str(uuid_path.parent), str(self.discarded_captures_dir / uuid_path.parent.name))