Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 896d90a1 authored by Gopi Sakshihally Bhuthaiah's avatar Gopi Sakshihally Bhuthaiah
Browse files

fix for exception

TypeError:to_bytes() missing required argument 'byteorder' (pos 2)

Test: atest HidHostTest
Flag: TEST_ONLY
Bug: 368575445

Change-Id: I9831bd2b394bf823e8e23f29ebc4bd6ab09ed384
parent f22d0772
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ import grpc
import grpc.aio
import logging
import struct
import sys

from bumble.device import Device
from google.protobuf import empty_pb2  # pytype: disable=pyi-error
@@ -674,7 +675,7 @@ def on_set_report_cb(report_id: int, report_type: int, report_size: int, data: b

def on_get_protocol_cb():
    retValue = hid_device.GetSetStatus()
    retValue.data = protocol_mode.to_bytes(length=1)
    retValue.data = protocol_mode.to_bytes(length=1, byteorder=sys.byteorder)
    retValue.status = hid_device.GetSetReturn.SUCCESS
    return retValue