Skip to content

Commit 46e109c

Browse files
committed
Pylint fixes
1 parent decd12b commit 46e109c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

plugwise_usb/network/registry.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
NodeRemoveRequest,
1818
PlugwiseRequest,
1919
)
20-
from ..messages.responses import NodeResponseType, PlugwiseResponse
20+
from ..messages.responses import PlugwiseResponse
2121
from .cache import NetworkRegistrationCache
2222

2323
_LOGGER = logging.getLogger(__name__)
@@ -250,8 +250,7 @@ async def register_node(self, mac: str) -> int:
250250

251251
request = NodeAddRequest(self._send_to_controller, bytes(mac, UTF8), True)
252252
try:
253-
response = await request.send()
254-
if response is None:
253+
if (response := await request.send()) is None:
255254
raise NodeError(f"Failed to register node {mac}, no response received")
256255
_LOGGER.debug("register_node | response ack_id: %s", response.ack_id)
257256
except MessageError as exc:

0 commit comments

Comments
 (0)