def config_path(path=None, final=False):
    """Return config path."""
    if final and path:
        return path

    if path is None:
        path = default_config_dir()
    try:
        os.makedirs(path)
    except OSError as e:  # pragma: no cover
        if e.errno != errno.EEXIST:
            raise
    return os.path.join(path, 'config.yml')
Return config path.