def find_config_path(user_config_path=None):
    """Return the path to the user configuration files.

    If no directory is found the system will exit.
    The lookup will be done in the following directories:
      $(user_config_path)/
      /etc/openstack_deploy/

    :param user_config_path: ``str`` Location to look in FIRST for a file
    """
    path_check = [
        os.path.join('/etc', 'openstack_deploy'),
    ]

    if user_config_path is not None:
        path_check.insert(0, os.path.expanduser(user_config_path))

    for f in path_check:
        if os.path.isdir(f):
            return f
    else:
        raise SystemExit(path_check % 'No config found at: %s')
dataset/ETHPy150Open openstack/openstack-ansible/playbooks/inventory/dynamic_inventory.py/find_config_path/swapped operands of `%`