Clean up
This commit is contained in:
parent
8e84287150
commit
d02cf88a9a
@ -5,8 +5,6 @@ import struct
|
|||||||
import array
|
import array
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
feed_id = "RadESP"
|
|
||||||
|
|
||||||
return_str =[
|
return_str =[
|
||||||
"Connection successful",
|
"Connection successful",
|
||||||
"incorrect protocol version",
|
"incorrect protocol version",
|
||||||
@ -30,9 +28,8 @@ def on_connect(client, userdata, rc):
|
|||||||
# reconnect then subscriptions will be renewed.
|
# reconnect then subscriptions will be renewed.
|
||||||
else:
|
else:
|
||||||
print(return_str[rc])
|
print(return_str[rc])
|
||||||
if(args.dry_run):
|
client.subscribe(args.topic)
|
||||||
print("***Dry Run***")
|
print("Subscribed to {}".format(args.topic))
|
||||||
client.subscribe(feed_id)
|
|
||||||
|
|
||||||
def on_disconnect(client, userdata, rc):
|
def on_disconnect(client, userdata, rc):
|
||||||
"""Callback for disconnect"""
|
"""Callback for disconnect"""
|
||||||
|
Loading…
Reference in New Issue
Block a user