Skip to content

Commit

Permalink
Merge pull request #481 from google/gbg/command-status-fix
Browse files Browse the repository at this point in the history
allow checking results for HCI_Command_Status_Event
  • Loading branch information
barbibulle committed May 10, 2024
2 parents 22eb405 + 0901588 commit 7fbfdb6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bumble/host.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,9 @@ async def send_command(self, command, check_result=False):

# Check the return parameters if required
if check_result:
if isinstance(response.return_parameters, int):
if isinstance(response, hci.HCI_Command_Status_Event):
status = response.status
elif isinstance(response.return_parameters, int):
status = response.return_parameters
elif isinstance(response.return_parameters, bytes):
# return parameters first field is a one byte status code
Expand Down

0 comments on commit 7fbfdb6

Please sign in to comment.