Add test for GATT error while doing a read

This commit is contained in:
J. Nick Koston 2023-11-26 13:55:45 -06:00
parent 6818f99255
commit 05312d1c68
No known key found for this signature in database
1 changed files with 3 additions and 2 deletions

View File

@ -476,8 +476,9 @@ class APIClient:
)
if (
type(resp) is BluetoothGATTErrorResponse
): # pylint: disable=unidiomatic-typecheck
type(resp)
is BluetoothGATTErrorResponse # pylint: disable=unidiomatic-typecheck
):
raise BluetoothGATTAPIError(BluetoothGATTError.from_pb(resp))
return resp