def set_service_ports(app, servicePort):
    app['labels']['HAPROXY_0_PORT'] = str(get_service_port(app))
    try:
        app['container']['docker']['portMappings'][0]['servicePort'] \
            = int(servicePort)
        return app
    except __HOLE__:
        app['ports'][0] = int(servicePort)
        return app
dataset/ETHPy150Open mesosphere/marathon-lb/bluegreen_deploy.py/set_service_ports