Skip to content

Commit

Permalink
Minor fix to ensure Python 3 support in the debugger
Browse files Browse the repository at this point in the history
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 [email protected]
  • Loading branch information
robertsipka committed Nov 15, 2024
1 parent bd0d391 commit 0a07b94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jerry-debugger/jerry_client_websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0a07b94

Please sign in to comment.