umqtt.robust: publish(): Adapt signature to umqtt.simple.

umqtt.simple uses publish(self, topic, msg, retain=False, qos=0), so
make umqtt.robust use the same. Otherwise, retain and qos will not work.
pull/86/head
puuu 2016-07-27 00:03:01 +09:00 zatwierdzone przez Paul Sokolovsky
rodzic 6190cec14a
commit 20cd8e4651
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -26,10 +26,10 @@ class MQTTClient(simple.MQTTClient):
i += 1
self.delay(i)
def publish(self, topic, msg, qos=0, retain=False):
def publish(self, topic, msg, retain=False, qos=0):
while 1:
try:
return super().publish(topic, msg, qos, retain)
return super().publish(topic, msg, retain, qos)
except OSError as e:
self.log(False, e)
self.reconnect()