Skip to content

Commit ca12a3c

Browse files
committed
trying to fix commit checks
1 parent e5a3f10 commit ca12a3c

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

adafruit_minimqtt/adafruit_minimqtt.py

+4-6
Original file line numberDiff line numberDiff line change
@@ -857,22 +857,20 @@ def loop(self, timeout=0):
857857

858858
stamp = time.monotonic()
859859
self._sock.settimeout(timeout)
860-
rcs = []
860+
responses = []
861861
while True:
862862
rc = self._wait_for_msg()
863-
if rc == None:
863+
if rc is None:
864864
break
865865
if time.monotonic() - stamp > self._recv_timeout:
866866
if self.logger is not None:
867867
self.logger.debug(
868868
f"Loop timed out, message queue not empty after {self._recv_timeout}s"
869869
)
870870
break
871-
else:
872-
rcs.append(rc)
873-
874-
return rcs if rcs else None
871+
responses.append(rc)
875872

873+
return responses if responses else None
876874

877875
def _wait_for_msg(self, timeout=0.1):
878876
"""Reads and processes network events."""

0 commit comments

Comments
 (0)