From 4e0e4863a001968a0a3217b2b887769e84cc0726 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Thu, 25 Oct 2018 20:14:50 +0200 Subject: [PATCH] Don't modify Redis args directly when initializing the object in another plugin --- platypush/plugins/adafruit/io.py | 2 +- platypush/plugins/light/hue/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/platypush/plugins/adafruit/io.py b/platypush/plugins/adafruit/io.py index 0a5b8d1ad..8c98840e7 100644 --- a/platypush/plugins/adafruit/io.py +++ b/platypush/plugins/adafruit/io.py @@ -75,7 +75,7 @@ class AdafruitIoPlugin(Plugin): def _get_redis(self): from redis import Redis - redis_args = get_backend('redis').redis_args + redis_args = get_backend('redis').redis_args.copy() redis_args['socket_timeout'] = 1 return Redis(**redis_args) diff --git a/platypush/plugins/light/hue/__init__.py b/platypush/plugins/light/hue/__init__.py index 8536e70d8..b67142cbe 100644 --- a/platypush/plugins/light/hue/__init__.py +++ b/platypush/plugins/light/hue/__init__.py @@ -706,7 +706,7 @@ class LightHuePlugin(LightPlugin): self.animation_thread = None self.redis = None - redis_args = get_backend('redis').redis_args + redis_args = get_backend('redis').redis_args.copy() redis_args['socket_timeout'] = transition_seconds self.redis = Redis(**redis_args)