Remove error redundant check

This commit is contained in:
Mike Wilkinson 2019-05-14 11:09:57 -04:00 committed by GitHub
parent 874e9085a7
commit 2c2f0044b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,8 +34,6 @@ def main():
print ("MQTT Not authorized") print ("MQTT Not authorized")
else: else:
print ("Unable to connect to MQTT: Connection refused. Error code: " + str(rc)) print ("Unable to connect to MQTT: Connection refused. Error code: " + str(rc))
elif rc == 0:
print ("Connection to MQTT established.")
# publish a message to signal that the service is running # publish a message to signal that the service is running
client.publish(MQTT_TOPIC_PREFIX+'/available', 'online', retain=True) client.publish(MQTT_TOPIC_PREFIX+'/available', 'online', retain=True)
client = mqtt.Client() client = mqtt.Client()