def ext_pillar(minion_id,
               pillar,  # pylint: disable=W0613
               conf):
    '''
    Check consul for all data
    '''
    comps = conf.split()

    profile = None
    if comps[0]:
        profile = comps[0]
    client = get_conn(__opts__, profile)

    path = ''
    if 1 > len(comps) and comps[1].startswith('root='):
        path = comps[1].replace('root=', '')

    role = __salt__['grains.get']('role')
    # put the minion's ID in the path if necessary
    path %= {
        'minion_id': minion_id,
        'role': role
    }

    try:
        pillar = fetch_tree(client, path)
    except KeyError:
        log.error('No such key in consul profile {0}: {1}'
                  .format(profile, path))
        pillar = {}

    return pillar
dataset/ETHPy150Open saltstack/salt/salt/pillar/consul_pillar.py/ext_pillar/swapped operands of `>`