def get_service_port(app):
    try:
        return app['container']['docker']['portMappings'][0]['servicePort']
    except __HOLE__:
        return app['ports'][0]
dataset/ETHPy150Open mesosphere/marathon-lb/bluegreen_deploy.py/get_service_port