Cover both the cases where the Redis backend is not configured and where it's None

This commit is contained in:
Fabio Manganiello 2018-06-14 20:44:06 +02:00
parent bd18d1cbc1
commit b7181085f3
1 changed files with 2 additions and 0 deletions

View File

@ -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")