Comment 7 for bug 1840788

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.opendev.org/677856
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=791fa595e6f1eb2447a4bebf4ecb390c85de0b44
Submitter: Zuul
Branch: master

commit 791fa595e6f1eb2447a4bebf4ecb390c85de0b44
Author: melanie witt <email address hidden>
Date: Wed Aug 21 23:52:52 2019 +0000

    Handle websockify v0.9.0 in console proxy

    In websockify v0.9.0, the 'socket' staticmethod moved from the
    websockfiy.websocket.WebSocketServer class to the
    websockify.websockifyserver.WebSockifyServer class [1][2], so our
    import of the top-level module is no longer sufficient for accessing
    the 'socket' method [3] when using v0.9.0:

     AttributeError: module 'websockify' has no attribute 'WebSocketServer'

    This adds a try_import from the v0.9.0 location and uses
    WebSockifyServer.socket if the module is present. Otherwise, it
    will fall back on the old location. This way, we are able to run with
    websockify v0.9.0 and earlier versions with the same code.

    Partial-Bug: #1840788

    [1] https://github.com/novnc/websockify/commit/8a697622495fd319582cd1c604e7eb2cc0ac0ef6
    [2] https://github.com/novnc/websockify/commit/e47591f4aaa0221a187d3ea2f61c7ab5bb93ed54
    [3] https://github.com/novnc/websockify/blob/v0.9.0/websockify/__init__.py

    Change-Id: I4a50e2f772101315140df43910be2e3f69a63b73