From 9581229f3e54ba7724509a43eaea897baaf7ee3e Mon Sep 17 00:00:00 2001 From: Roger Light Date: Sat, 22 Jun 2013 22:15:17 +0100 Subject: [PATCH] Print retain as int not bool. --- src/paho/mqtt/client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/paho/mqtt/client.py b/src/paho/mqtt/client.py index fabef9b..d87e282 100755 --- a/src/paho/mqtt/client.py +++ b/src/paho/mqtt/client.py @@ -1323,10 +1323,10 @@ class Client: packet.extend(struct.pack("!B", command)) if payload == None: remaining_length = 2+len(topic) - self._easy_log(MQTT_LOG_DEBUG, "Sending PUBLISH (d"+str(dup)+", q"+str(qos)+", r"+str(retain)+", m"+str(mid)+", '"+topic+"' (NULL payload)") + self._easy_log(MQTT_LOG_DEBUG, "Sending PUBLISH (d"+str(dup)+", q"+str(qos)+", r"+str(int(retain))+", m"+str(mid)+", '"+topic+"' (NULL payload)") else: remaining_length = 2+len(topic) + len(payload) - self._easy_log(MQTT_LOG_DEBUG, "Sending PUBLISH (d"+str(dup)+", q"+str(qos)+", r"+str(retain)+", m"+str(mid)+", '"+topic+"', ... ("+str(len(payload))+" bytes)") + self._easy_log(MQTT_LOG_DEBUG, "Sending PUBLISH (d"+str(dup)+", q"+str(qos)+", r"+str(int(retain))+", m"+str(mid)+", '"+topic+"', ... ("+str(len(payload))+" bytes)") if qos > 0: # For message id -- 2.39.5