some minor linting

This commit is contained in:
Ilan
2015-07-22 17:13:29 +02:00
parent 1a24bb60dd
commit a8b562bc04
2 changed files with 16 additions and 7 deletions
+7
View File
@@ -8,6 +8,9 @@ import redis
class Conf(object):
"""
Configuration class
"""
try:
conf = settings.Q_CLUSTER
except AttributeError:
@@ -93,6 +96,10 @@ if Conf.DJANGO_REDIS:
def get_redis_client():
"""
Returns a connection from redis-py or django-redis
:return: a redis client
"""
if Conf.DJANGO_REDIS and django_redis:
return django_redis.get_redis_connection(Conf.DJANGO_REDIS)
return redis.StrictRedis(**Conf.REDIS)