Skip to content

Commit

Permalink
Fixed use of wrong enum in unpair function of WinRT backend
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenjagers committed Sep 8, 2022
1 parent d255663 commit 85fac7b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Fixed
-----
* Fixed wrong error message for BlueZ "Operation failed with ATT error". Merged #975.
* Fixed possible ``AttributeError`` when enabling notifications for battery service in BlueZ backend. Merged #976.
* Fixed use of wrong enum in unpair function of WinRT backend.

Removed
-------
Expand Down
4 changes: 2 additions & 2 deletions bleak/backends/winrt/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,8 +482,8 @@ async def unpair(self) -> bool:
unpairing_result = await device_information.pairing.unpair_async()

if unpairing_result.status not in (
DevicePairingResultStatus.PAIRED,
DevicePairingResultStatus.ALREADY_PAIRED,
DeviceUnpairingResultStatus.UNPAIRED,
DeviceUnpairingResultStatus.ALREADY_UNPAIRED,
):
raise BleakError(
"Could not unpair with device: {0}: {1}".format(
Expand Down

0 comments on commit 85fac7b

Please sign in to comment.