Skip to content

Commit 008ad19

Browse files
committed
rename the variable to match the purpose
1 parent 1dc406b commit 008ad19

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

adafruit_minimqtt/adafruit_minimqtt.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -856,15 +856,15 @@ def subscribe(self, topic: str, qos: int = 0) -> None:
856856
self.logger.debug(f"Variable Header: {var_header}")
857857
self._sock.send(var_header)
858858
# attaching topic and QOS level to the packet
859-
packet = bytes()
859+
payload = bytes()
860860
for t, q in topics:
861861
topic_size = len(t.encode("utf-8")).to_bytes(2, "big")
862862
qos_byte = q.to_bytes(1, "big")
863-
packet += topic_size + t.encode() + qos_byte
863+
payload += topic_size + t.encode() + qos_byte
864864
for t, q in topics:
865865
self.logger.debug(f"SUBSCRIBING to topic {t} with QoS {q}")
866-
self.logger.debug(f"packet: {packet}")
867-
self._sock.send(packet)
866+
self.logger.debug(f"payload: {payload}")
867+
self._sock.send(payload)
868868
stamp = self.get_monotonic_time()
869869
while True:
870870
op = self._wait_for_msg()

0 commit comments

Comments
 (0)