fix: Failure on new install

pull/137/head
Raphaël Vinot 2020-12-11 10:26:42 +01:00
parent fe9e185ec2
commit 62cb5a9eb7
1 changed files with 5 additions and 1 deletions

View File

@ -467,7 +467,11 @@ class Lookyloo():
def sorted_cache(self): def sorted_cache(self):
all_cache: List[Dict[str, Union[str, Path]]] = [] all_cache: List[Dict[str, Union[str, Path]]] = []
p = self.redis.pipeline() p = self.redis.pipeline()
for directory in self.redis.hmget('lookup_dirs', *self.capture_uuids): capture_uuids = self.capture_uuids
if not capture_uuids:
# No cached captures at all
return all_cache
for directory in self.redis.hmget('lookup_dirs', *capture_uuids):
if directory: if directory:
p.hgetall(directory) p.hgetall(directory)
all_cache = [] all_cache = []