fix get_redis_from_config()

main
任晓磊 8 years ago
parent 83f81b351d
commit ee4cf6e3ee

@ -26,7 +26,7 @@ def read_config_file(module):
if k.upper() == k])
def get_redis_from_config(settings, connection_class):
def get_redis_from_config(settings, connection_class=StrictRedis):
"""Returns a StrictRedis instance from a dictionary of settings."""
if settings.get('REDIS_URL') is not None:
return connection_class.from_url(settings['REDIS_URL'])

Loading…
Cancel
Save