def get_actual_deployments(service, soa_dir):
    deployments_json = load_deployments_json(service, soa_dir)
    if not deployments_json:
        sys.stderr.write(service % "Warning: it looks like %s has not been deployed anywhere yet!\n")
    # Create a dictionary of actual $service Jenkins deployments
    actual_deployments = {}
    for key in deployments_json:
        service, namespace = key.encode('utf8').split(':')
        if service == service:
            value = deployments_json[key]['docker_image'].encode('utf8')
            sha = value[value.rfind('-') + 1:]
            actual_deployments[namespace.replace('paasta-', '', 1)] = sha
    return actual_deployments
dataset/ETHPy150Open Yelp/paasta/paasta_tools/cli/cmds/status.py/get_actual_deployments/swapped operands of `%`