def get_database(self, override=None):
<EOL>redis_args = self['<STR_LIT>']<EOL>if override:<EOL><INDENT>redis_args = redis_args.copy()<EOL>for key, value in self[override].items():<EOL><INDENT>if not key.startswith('<STR_LIT>'):<EOL><INDENT>continue<EOL><DEDENT>key = key[len('<STR_LIT>'):]<EOL>if value:<EOL><INDENT>redis_args[key] = value<EOL><DEDENT>else:<EOL><INDENT>redis_args.pop(key, None)<EOL><DEDENT><DEDENT><DEDENT>return database.initialize(redis_args)<EOL>
Convenience function for obtaining a handle to the Redis
database.  By default, uses the connection options from the
'[redis]' section.  However, if the override parameter is
given, it specifies a section containing overrides for the
Redis connection info; the keys will all be prefixed with
'redis.'.  For example, in the following configuration file:

    [redis]
    host = 10.0.0.1
    password = s3cureM3!

    [control]
    redis.host = 127.0.0.1

A call to get_database() would return a handle for the redis
database on 10.0.0.1, while a call to get_database('control')
would return a handle for the redis database on 127.0.0.1; in
both cases, the database password would be 's3cureM3!'.