From aaf90df7e001e9f6c224be5095825d67d08be53b Mon Sep 17 00:00:00 2001 From: Sebastian Waldbauer Date: Thu, 9 Sep 2021 10:50:41 +0200 Subject: [PATCH] FIX: statistics_host returns if no host value is given Fixes #2103 Signed-off-by: Sebastian Waldbauer --- intelmq/lib/cache.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/intelmq/lib/cache.py b/intelmq/lib/cache.py index 2d40b2cfb..991bc8203 100644 --- a/intelmq/lib/cache.py +++ b/intelmq/lib/cache.py @@ -24,6 +24,9 @@ class Cache(): def __init__(self, host: str, port: int, db: str, ttl: int, password: Optional[str] = None): + if host is None: + return + if host.startswith("/"): kwargs = {"unix_socket_path": host}