Browse Source

MT#55283 fix python websockets version test

The newest module comes with a version string of "15.0.1" which makes
the conversion to float fail. Use string operations to fix.

Change-Id: Ia13534e9eeab451261d4c48fa782b116652b6904
(cherry picked from commit 9542cc0f3f)
(cherry picked from commit f288ca5edb)
mr12.5.1
Richard Fuchs 8 months ago
parent
commit
d18066a3d6
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      t/auto-daemon-tests-websocket.py

+ 3
- 1
t/auto-daemon-tests-websocket.py View File

@ -21,7 +21,9 @@ async def make_ws(cls, proto):
from platform import python_version
from websockets import __version__
if sys.version_info >= (3, 10) and float(__version__) <= 9.1:
ws_ver = str(__version__)
ws_ver = '.'.join(ws_ver.split('.')[0:2])
if sys.version_info >= (3, 10) and float(ws_ver) <= 9.1:
python_v = python_version()
msg = "python3-websocket {} unsupported in {}".format(__version__, python_v)
raise unittest.SkipTest(msg)


Loading…
Cancel
Save