Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions bleak/backends/bluezdbus/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@ async def disconnect_device() -> None:
],
)
)
assert reply
assert_reply(reply)

# REVIST: This leaves "Trusted" property set if we
Expand Down Expand Up @@ -306,7 +305,6 @@ async def disconnect_device() -> None:
member="Connect",
)
)
assert reply

if reply.message_type == MessageType.ERROR:
# This error is often caused by RF interference
Expand Down Expand Up @@ -459,7 +457,6 @@ async def disconnect(self) -> None:
member="Disconnect",
)
)
assert reply
assert_reply(reply)
async with async_timeout(10):
await self._disconnecting_event.wait()
Expand Down Expand Up @@ -489,7 +486,6 @@ async def pair(self, *args: Any, **kwargs: Any) -> None:
body=[defs.DEVICE_INTERFACE, "Paired"],
)
)
assert reply
assert_reply(reply)
if reply.body[0].value:
logger.debug("BLE device @ %s is already paired", self.address)
Expand All @@ -506,7 +502,6 @@ async def pair(self, *args: Any, **kwargs: Any) -> None:
body=[defs.DEVICE_INTERFACE, "Trusted", Variant("b", True)],
)
)
assert reply
assert_reply(reply)

logger.debug("Pairing to BLE device @ %s", self.address)
Expand All @@ -519,7 +514,6 @@ async def pair(self, *args: Any, **kwargs: Any) -> None:
member="Pair",
)
)
assert reply
assert_reply(reply)

# For resolvable private addresses, the address will
Expand Down Expand Up @@ -568,7 +562,6 @@ async def unpair(self) -> None:
body=[device_path],
)
)
assert reply
assert_reply(reply)
except BleakDBusError as e:
if e.dbus_error == "org.bluez.Error.DoesNotExist":
Expand Down Expand Up @@ -632,7 +625,6 @@ async def _acquire_mtu(self) -> None:
body=[{}],
)
)
assert reply
assert_reply(reply)

# we aren't actually using the write or notify, we just want the MTU
Expand Down Expand Up @@ -750,8 +742,6 @@ async def read_gatt_char(
)
)

assert reply

if reply.error_name == "org.bluez.Error.InProgress":
logger.debug("retrying characteristic ReadValue due to InProgress")
# Avoid calling in a tight loop. There is no dbus signal to
Expand Down Expand Up @@ -800,8 +790,6 @@ async def read_gatt_descriptor(
)
)

assert reply

if reply.error_name == "org.bluez.Error.InProgress":
logger.debug("retrying descriptor ReadValue due to InProgress")
# Avoid calling in a tight loop. There is no dbus signal to
Expand Down Expand Up @@ -843,8 +831,6 @@ async def write_gatt_char(
)
)

assert reply

if reply.error_name == "org.bluez.Error.InProgress":
logger.debug("retrying characteristic WriteValue due to InProgress")
# Avoid calling in a tight loop. There is no dbus signal to
Expand Down Expand Up @@ -890,8 +876,6 @@ async def write_gatt_descriptor(
)
)

assert reply

if reply.error_name == "org.bluez.Error.InProgress":
logger.debug("retrying descriptor WriteValue due to InProgress")
# Avoid calling in a tight loop. There is no dbus signal to
Expand Down Expand Up @@ -975,7 +959,6 @@ async def start_notify(
signature="a{sv}",
)
)
assert reply
assert_reply(reply)

unix_fd = reply.unix_fds[0]
Expand All @@ -991,7 +974,6 @@ async def start_notify(
member="StartNotify",
)
)
assert reply
assert_reply(reply)

@override
Expand Down Expand Up @@ -1041,6 +1023,5 @@ async def stop_notify(self, characteristic: BleakGATTCharacteristic) -> None:
member="StopNotify",
)
)
assert reply
assert_reply(reply)
self._notification_callbacks.pop(characteristic.obj[0], None)
7 changes: 0 additions & 7 deletions bleak/backends/bluezdbus/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,6 @@ async def async_init(self) -> None:
interface=defs.OBJECT_MANAGER_INTERFACE,
)
)
assert reply
assert_reply(reply)

# dictionaries are cleared in case AddInterfaces was received first
Expand Down Expand Up @@ -465,7 +464,6 @@ async def active_scan(
body=[filters],
)
)
assert reply
assert_reply(reply)

# Start scanning
Expand All @@ -477,7 +475,6 @@ async def active_scan(
member="StartDiscovery",
)
)
assert reply
assert_reply(reply)

async def stop() -> None:
Expand All @@ -502,7 +499,6 @@ async def stop() -> None:
member="StopDiscovery",
)
)
assert reply

try:
assert_reply(reply)
Expand All @@ -521,7 +517,6 @@ async def stop() -> None:
body=[{}],
)
)
assert reply
assert_reply(reply)

return stop
Expand Down Expand Up @@ -589,7 +584,6 @@ async def passive_scan(
body=[monitor_path],
)
)
assert reply

if (
reply.message_type == MessageType.ERROR
Expand Down Expand Up @@ -631,7 +625,6 @@ async def stop() -> None:
body=[monitor_path],
)
)
assert reply
assert_reply(reply)

return stop
Expand Down
2 changes: 0 additions & 2 deletions bleak/backends/bluezdbus/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ async def add_match(bus: MessageBus, rules: MatchRules) -> Message:
body=[str(rules)],
)
)
assert reply

return reply

Expand All @@ -210,6 +209,5 @@ async def remove_match(bus: MessageBus, rules: MatchRules) -> Message:
body=[str(rules)],
)
)
assert reply

return reply
78 changes: 39 additions & 39 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading