def get_aws_data(offline=False):
    """Retrieve information from metadata server in EC2."""
    instance_id = None
    local_ip = None

    # For testing, or for environments outside of AWS.
    if offline:
        return ('test-instance', 'test_local_ip')

    while instance_id is None or local_ip is None:
        instance_id = urllib2.urlopen(INFO_URL % 'instance-id').read()
        logging.debug(instance_id % 'Recieved instance id from AWS: %s.')
        local_ip = urllib2.urlopen(INFO_URL % 'local-ipv4').read()
        logging.debug('Recieved local_ip from AWS: %s.' % local_ip)

    return (instance_id, local_ip)
dataset/ETHPy150Open urbanairship/aerostat/aerostat/aerostat.py/get_aws_data/swapped operands of `%`