Minor fix to ensure Python 3 support in the debugger (#5168)
The default value for length in to_bytes was added in Python version 3.11. This small fix ensures the compatibility with older Python3 versions. JerryScript-DCO-1.0-Signed-off-by: Robert Sipka robert.sipka@h-lab.eu
This commit is contained in:
@@ -90,7 +90,7 @@ class WebSocket:
|
|||||||
""" Send message. """
|
""" Send message. """
|
||||||
message = struct.pack(byte_order + "BBI",
|
message = struct.pack(byte_order + "BBI",
|
||||||
WEBSOCKET_BINARY_FRAME | WEBSOCKET_FIN_BIT,
|
WEBSOCKET_BINARY_FRAME | WEBSOCKET_FIN_BIT,
|
||||||
WEBSOCKET_FIN_BIT + struct.unpack(byte_order + "B", packed_data[0].to_bytes())[0],
|
WEBSOCKET_FIN_BIT + struct.unpack(byte_order + "B", packed_data[0:1])[0],
|
||||||
0) + packed_data[1:]
|
0) + packed_data[1:]
|
||||||
|
|
||||||
self.__send_data(message)
|
self.__send_data(message)
|
||||||
|
|||||||
Reference in New Issue
Block a user