fix: shutil.move wants str (not Path) for python<3.9

pull/391/head
Raphaël Vinot 2022-04-10 12:43:56 +02:00
parent b7ee3a7ecb
commit 83fc0bd8f4
1 changed files with 1 additions and 1 deletions

View File

@ -62,7 +62,7 @@ class BackgroundIndexer(AbstractManager):
self.logger.warning(f'Unable to build pickle for {uuid}: {uuid_path.parent.name}') self.logger.warning(f'Unable to build pickle for {uuid}: {uuid_path.parent.name}')
# The capture is not working, moving it away. # The capture is not working, moving it away.
self.lookyloo.redis.hdel('lookup_dirs', uuid) self.lookyloo.redis.hdel('lookup_dirs', uuid)
shutil.move(uuid_path.parent, (self.discarded_captures_dir / uuid_path.parent.name)) shutil.move(str(uuid_path.parent), str(self.discarded_captures_dir / uuid_path.parent.name))
def _check_indexes(self): def _check_indexes(self):
index_redis = self.lookyloo.indexing.redis index_redis = self.lookyloo.indexing.redis