Permalink
Browse files

Helps when I put brackets in

  • Loading branch information...
1 parent 2489052 commit b10dde8187dde399436a04d9a80b8a64901fe67d @kylegordon committed Sep 26, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 mqtt-republisher.py
View
@@ -38,7 +38,7 @@ def cleanup(signum, frame):
in the event of a SIGTERM or SIGINT.
"""
logging.info("Disconnecting from broker")
- mqttc.publish("/status/" + socket.getfqdn, "Offline")
+ mqttc.publish("/status/" + socket.getfqdn(), "Offline")
mqttc.disconnect()
logging.info("Exiting on signal %d", signum)
@@ -58,7 +58,7 @@ def on_connect(result_code):
## FIXME - needs fleshing out http://mosquitto.org/documentation/python/
if result_code == 0:
logging.info("Connected to broker")
- mqttc.publish("/status/" + socket.getfqdn, "Online")
+ mqttc.publish("/status/" + socket.getfqdn(), "Online")
else:
logging.warning("Something went wrong")
cleanup()

0 comments on commit b10dde8

Please sign in to comment.