From e19218c6a9006746e5dec177f908a1677595b73c Mon Sep 17 00:00:00 2001 From: Ryan Kaskel Date: Tue, 29 Nov 2022 12:15:18 +0000 Subject: [PATCH] Copy client connection kwargs before mutating --- searx/shared/redisdb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/searx/shared/redisdb.py b/searx/shared/redisdb.py index ba4a76ba..d8e29d91 100644 --- a/searx/shared/redisdb.py +++ b/searx/shared/redisdb.py @@ -47,7 +47,7 @@ def initialize(): _CLIENT = redis.Redis.from_url(redis_url) # log the parameters as seen by the redis lib, without the password - kwargs = _CLIENT.get_connection_kwargs() + kwargs = _CLIENT.get_connection_kwargs().copy() kwargs.pop('password', None) kwargs = ' '.join([f'{k}={v!r}' for k, v in kwargs.items()]) logger.info("connecting to Redis %s", kwargs)