From 09b3b169106922d8a233dedce7554989e611ddd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Tue, 11 Feb 2020 17:26:01 +0100 Subject: [PATCH] fix: Properly check keys in cache --- lookyloo/lookyloo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lookyloo/lookyloo.py b/lookyloo/lookyloo.py index 6c48f818..54283693 100644 --- a/lookyloo/lookyloo.py +++ b/lookyloo/lookyloo.py @@ -89,7 +89,7 @@ class Lookyloo(): if isinstance(report_dir, Path): report_dir = str(report_dir) cached = self.redis.hgetall(report_dir) - if all(key in ['uuid', 'title', 'timestamp', 'url', 'redirects'] for key in cached): + if all(key in cached.keys() for key in ['uuid', 'title', 'timestamp', 'url', 'redirects']): cached['redirects'] = json.loads(cached['redirects']) return cached