mirror of https://github.com/CIRCL/lookyloo
chg: improve lookup_dirs cleanup
parent
11b3654b10
commit
5bd0ae850f
|
@ -16,8 +16,8 @@ def rename_captures():
|
|||
with uuid_path.open() as f:
|
||||
uuid = f.read()
|
||||
dir_key = r.hget('lookup_dirs', uuid)
|
||||
r.hdel('lookup_dirs', uuid)
|
||||
if dir_key:
|
||||
r.hdel('lookup_dirs', uuid)
|
||||
r.delete(dir_key)
|
||||
timestamp = datetime.strptime(uuid_path.parent.name, '%Y-%m-%dT%H:%M:%S.%f')
|
||||
dest_dir = capture_dir / str(timestamp.year) / f'{timestamp.month:02}'
|
||||
|
|
Loading…
Reference in New Issue