chg: Avoid stacktrace when trying to generate broken capture

pull/526/head
Raphaël Vinot 2022-09-23 14:46:19 +02:00
parent 18b0b6e3cd
commit da33a7f5b3
1 changed files with 2 additions and 2 deletions

View File

@ -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))