mirror of https://github.com/CIRCL/lookyloo
fix: Avoid exception if a file is missing on s3
parent
0f86f6cd2b
commit
d06da1aa52
|
@ -163,9 +163,13 @@ class Archiver(AbstractManager):
|
||||||
# capture_dir_name is *only* the isoformat of the capture.
|
# capture_dir_name is *only* the isoformat of the capture.
|
||||||
# This directory will either be directly in the month directory (old format)
|
# This directory will either be directly in the month directory (old format)
|
||||||
# or in the day directory (new format)
|
# or in the day directory (new format)
|
||||||
if not next(capture_dir.iterdir(), None):
|
try:
|
||||||
self.logger.warning(f'{capture_dir} is empty, removing.')
|
if not next(capture_dir.iterdir(), None):
|
||||||
capture_dir.rmdir()
|
self.logger.warning(f'{capture_dir} is empty, removing.')
|
||||||
|
capture_dir.rmdir()
|
||||||
|
continue
|
||||||
|
except FileNotFoundError:
|
||||||
|
self.logger.warning(f'{capture_dir} does not exists.')
|
||||||
continue
|
continue
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue