Skip to content

Commit ed5a5cf

Browse files
author
Daniel Campora
authored
Add mandatory endianness argument to the .to_bytes() method
Thanks to @st3veV
1 parent 2995af0 commit ed5a5cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/mqtt/mqtt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def subscribe(self, topic, qos=0):
136136
#print(hex(len(pkt)), hexlify(pkt, ":"))
137137
self.sock.write(pkt)
138138
self._send_str(topic)
139-
self.sock.write(qos.to_bytes(1))
139+
self.sock.write(qos.to_bytes(1, 'little'))
140140
while 1:
141141
op = self.wait_msg()
142142
if op == 0x90:

0 commit comments

Comments
 (0)