From b7181085f3f2a60038a5aebcd09fc83513f9395c Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Thu, 14 Jun 2018 20:44:06 +0200 Subject: [PATCH] Cover both the cases where the Redis backend is not configured and where it's None --- platypush/backend/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platypush/backend/__init__.py b/platypush/backend/__init__.py index 559f41e4a9..0d81c2f747 100644 --- a/platypush/backend/__init__.py +++ b/platypush/backend/__init__.py @@ -196,6 +196,8 @@ class Backend(Thread): """ try: redis = get_backend('redis') + if not redis: + raise KeyError() except KeyError: self.logger.warning("Backend {} does not implement send_message " + "and the fallback Redis backend isn't configured")