Skip to content

Commit 023bce3

Browse files
committed
Make use of super().load() boolean-return
1 parent 399738e commit 023bce3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

plugwise_usb/nodes/sense.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,14 @@ async def load(self) -> bool:
5151
if self._loaded:
5252
return True
5353

54-
await super().load()
54+
if not await super().load():
55+
return False
56+
5557
self._setup_protocol(SENSE_FIRMWARE_SUPPORT, SENSE_FEATURES)
5658
if await self.initialize():
5759
await self._loaded_callback(NodeEvent.LOADED, self.mac)
5860
return True
61+
5962
_LOGGER.debug("Loading of Sense node %s failed", self._node_info.mac)
6063
return False
6164

0 commit comments

Comments
 (0)