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!'.

def get_database(self, override=None):
        """
        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!'.
        """

        # Grab the database connection arguments
        redis_args = self['redis']

        # If we have an override, read some overrides from that
        # section
        if override:
            redis_args = redis_args.copy()
            for key, value in self[override].items():
                if not key.startswith('redis.'):
                    continue
                key = key[len('redis.'):]
                if value:
                    redis_args[key] = value
                else:
                    redis_args.pop(key, None)

        # Return the redis database connection
        return database.initialize(redis_args)