Skip to content

Commit aaf90df

Browse files
FIX: statistics_host returns if no host value is given
Fixes #2103 Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
1 parent f2b07f6 commit aaf90df

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

intelmq/lib/cache.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ class Cache():
2424

2525
def __init__(self, host: str, port: int, db: str, ttl: int,
2626
password: Optional[str] = None):
27+
if host is None:
28+
return
29+
2730
if host.startswith("/"):
2831
kwargs = {"unix_socket_path": host}
2932

0 commit comments

Comments
 (0)