Skip to content

Commit d4cf635

Browse files
committed
Replace getattr() as suggested
1 parent 8efb91f commit d4cf635

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugwise_usb/nodes/circle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ async def set_relay(self, state: bool) -> bool:
637637
f"Changing state of relay is not supported for node {self.mac}"
638638
)
639639

640-
if getattr(self._relay_lock, "state"):
640+
if self._relay_lock.state:
641641
raise NodeError("Changing state of relay failed, it is locked")
642642

643643
_LOGGER.debug("set_relay() start")

0 commit comments

Comments
 (0)