diff --git a/bleak/backends/bluezdbus/advertisement_monitor.py b/bleak/backends/bluezdbus/advertisement_monitor.py index 922ffab4..9e900db2 100644 --- a/bleak/backends/bluezdbus/advertisement_monitor.py +++ b/bleak/backends/bluezdbus/advertisement_monitor.py @@ -74,14 +74,12 @@ def Activate(self): @method() @no_type_check def DeviceFound(self, device: "o"): # noqa: F821 - if logger.isEnabledFor(logging.DEBUG): - logger.debug("DeviceFound %s", device) + logger.debug("DeviceFound %s", device) @method() @no_type_check def DeviceLost(self, device: "o"): # noqa: F821 - if logger.isEnabledFor(logging.DEBUG): - logger.debug("DeviceLost %s", device) + logger.debug("DeviceLost %s", device) @dbus_property(PropertyAccess.READ) @no_type_check diff --git a/bleak/backends/bluezdbus/manager.py b/bleak/backends/bluezdbus/manager.py index 1d5d16b5..41b686e7 100644 --- a/bleak/backends/bluezdbus/manager.py +++ b/bleak/backends/bluezdbus/manager.py @@ -341,8 +341,7 @@ async def async_init(self) -> None: desc_props["Characteristic"], set() ).add(path) - if logger.isEnabledFor(logging.DEBUG): - logger.debug("initial properties: %s", self._properties) + logger.debug("initial properties: %s", self._properties) except BaseException: # if setup failed, disconnect @@ -876,14 +875,13 @@ def _parse_msg(self, message: Message) -> None: if message.message_type != MessageType.SIGNAL: return - if logger.isEnabledFor(logging.DEBUG): - logger.debug( - "received D-Bus signal: %s.%s (%s): %s", - message.interface, - message.member, - message.path, - message.body, - ) + logger.debug( + "received D-Bus signal: %s.%s (%s): %s", + message.interface, + message.member, + message.path, + message.body, + ) # type hints obj_path: str