Skip to content

Commit 59ffe34

Browse files
committed
use separate variable to avoid type complaints
1 parent ab88d0f commit 59ffe34

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

adafruit_minimqtt/adafruit_minimqtt.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,8 +1032,8 @@ def _wait_for_msg(self, timeout: float = 0.1) -> Union[int, None]:
10321032
# Handle only the PUBLISH packet type from now on.
10331033
sz = self._recv_len()
10341034
# topic length MSB & LSB
1035-
topic_len = self._sock_exact_recv(2)
1036-
topic_len = int((topic_len[0] << 8) | topic_len[1])
1035+
topic_len_buf = self._sock_exact_recv(2)
1036+
topic_len = int((topic_len_buf[0] << 8) | topic_len_buf[1])
10371037

10381038
if topic_len > sz - 2:
10391039
raise MMQTTException(

0 commit comments

Comments
 (0)