From 38e05b456987a26dc782a72c4221e396c9e35a20 Mon Sep 17 00:00:00 2001 From: Robert Sipka Date: Fri, 15 Nov 2024 14:35:24 +0100 Subject: [PATCH] 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 --- jerry-debugger/jerry_client_websocket.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jerry-debugger/jerry_client_websocket.py b/jerry-debugger/jerry_client_websocket.py index 178c8db4f9..2d0a7d7a04 100644 --- a/jerry-debugger/jerry_client_websocket.py +++ b/jerry-debugger/jerry_client_websocket.py @@ -90,7 +90,7 @@ def send_message(self, byte_order, packed_data): """ Send message. """ message = struct.pack(byte_order + "BBI", 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:] self.__send_data(message)