Comment 14 for bug 1762511

Revision history for this message
David Ivey (yevi) wrote :

I really just used your patch, but queens did not have the conditional statement in the function do_exec(387) like master so I added it, but left the variables from queens in zunclient/common/websocketclient/websocketclient.py.

def do_exec(zunclient, url, container_id, exec_id, escape, close_wait):
    if url.startswith("ws://") or url.startswith("wss://"):
        try:
            httpcls = HTTPClient(zunclient=zunclient, url=url,
                               exec_id=exec_id,
                               id=container_id, escape=escape,
                               close_wait=close_wait)
            httpcls.connect()
            httpcls.handle_resize()
            httpcls.start_loop()
        except exceptions.ContainerWebSocketException as e:
            print("%(e)s:%(container)s" %
                  {'e': e, 'container': container_id})
    else:
        raise exceptions.InvalidWebSocketLink(container_id)