def read(config, args):
    pp = pprint.PrettyPrinter()
    url = config['url'] + "/api/serveroverload/"

    if (args['all'] is False) and (args['serveroverloadprofile'] is None):
        print("No serveroverload(s) specified to read. Use -h to see usage.")
        return
    elif args['serveroverloadprofile'] is not None:
        url += args['serveroverloadprofile'] + "/"

    token = auth.get_token(config)
    r = requests.get(url, headers={"X-Auth-Token": token})
    if r.status_code != 200:
        print("API returned status code %s" % (r.status_code))
        sys.exit(1)
    else:
        profiles = json.loads(r.content)
        if "profiles" not in profiles:  # Put single responses in an array, the same way --all behaves
            profiles = {"profiles": [profiles, ]}

        # Step through response triggers in profiles, and append the 'number' key to indicate their sequence in the array
        for profile in profiles['profiles']:
            if profile in "response_triggers":
                trigger_num = 0
                for response_trigger in profile['response_triggers']:
                    response_trigger['position'] = trigger_num
                    trigger_num += 1

        pp.pprint(profiles)
dataset/ETHPy150Open emccode/heliosburn/heliosburn/hbcli/controllers/serveroverload.py/read/swapped operands of `in`