Skip to content

Commit b1e14bf

Browse files
committed
Improve further
1 parent e446fa2 commit b1e14bf

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

plugwise_usb/messages/requests.py

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -299,18 +299,9 @@ async def _process_stick_response(self, stick_response: StickResponse) -> None:
299299

300300
if stick_response.ack_id == StickResponseType.FAILED:
301301
prev_seq_id = self._seq_id
302-
self._unsubscribe_from_node()
303302
self._seq_id = None
304-
self._response_future.set_exception(
305-
NodeError(f"Stick failed request {prev_seq_id!r}")
306-
)
307-
308-
_LOGGER.debug(
309-
"Unknown StickResponseType %s at %s for request %s",
310-
str(stick_response.ack_id),
311-
stick_response,
312-
self,
313-
)
303+
self.assign_error(NodeError(f"Stick failed request {prev_seq_id!r}"))
304+
return
314305

315306
async def _send_request(
316307
self, suppress_node_errors=False

0 commit comments

Comments
 (0)