Skip to content

Commit 4a33f53

Browse files
committed
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 9542cc0) (cherry picked from commit ed899bc)
1 parent 7397052 commit 4a33f53

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

t/auto-daemon-tests-websocket.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ async def make_ws(cls, proto):
2121
from platform import python_version
2222
from websockets import __version__
2323

24-
if sys.version_info >= (3, 10) and float(__version__) <= 9.1:
24+
ws_ver = str(__version__)
25+
ws_ver = '.'.join(ws_ver.split('.')[0:2])
26+
if sys.version_info >= (3, 10) and float(ws_ver) <= 9.1:
2527
python_v = python_version()
2628
msg = "python3-websocket {} unsupported in {}".format(__version__, python_v)
2729
raise unittest.SkipTest(msg)

0 commit comments

Comments
 (0)