From eae0ac62fedb65d0e08618d6ac37dd2c39e2002c Mon Sep 17 00:00:00 2001 From: Roger Light Date: Mon, 17 Jun 2013 09:36:28 +0100 Subject: [PATCH] More mosq->paho name changes. --- examples/sub.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/sub.py b/examples/sub.py index f013247..05de62a 100755 --- a/examples/sub.py +++ b/examples/sub.py @@ -40,23 +40,23 @@ if cmd_subfolder not in sys.path: import paho.mqtt.client as mqtt -def on_connect(mosq, obj, rc): +def on_connect(mqttc, obj, rc): print("rc: "+str(rc)) -def on_message(mosq, obj, msg): +def on_message(mqttc, obj, msg): print(msg.topic+" "+str(msg.qos)+" "+str(msg.payload)) -def on_publish(mosq, obj, mid): +def on_publish(mqttc, obj, mid): print("mid: "+str(mid)) -def on_subscribe(mosq, obj, mid, granted_qos): +def on_subscribe(mqttc, obj, mid, granted_qos): print("Subscribed: "+str(mid)+" "+str(granted_qos)) -def on_log(mosq, obj, level, string): +def on_log(mqttc, obj, level, string): print(string) # If you want to use a specific client id, use -# mqttc = mosquitto.Mosquitto("client-id") +# mqttc = mqtt.Client("client-id") # but note that the client id must be unique on the broker. Leaving the client # id parameter empty will generate a random id for you. mqttc = mqtt.Client() -- 2.39.5