def getRedis(cfgRedis):
    if 'host' not in cfgRedis:
        cfgRedis.host = '127.0.0.1'
    if 'port' not in cfgRedis:
        cfgRedis.port = 6379
    if 'db' not in cfgRedis:
        cfgRedis.db = 0

    return redis.StrictRedis(host=cfgRedis.host, port=cfgRedis.port, db=cfgRedis.db)
dataset/ETHPy150Open bear/python-indieweb/indieweb.py/getRedis/original