瀏覽代碼

Merge pull request #1 from job/patch-1

Update mqtt2graphite.py
JP Mens 12 年之前
父節點
當前提交
8d2b307111
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      mqtt2graphite.py

+ 1 - 1
mqtt2graphite.py

@@ -67,7 +67,7 @@ def on_message(mosq, userdata, msg):
     # Find out how to handle the topic in this message: slurp through
     # our map 
     for t in map:
-        if mosquitto.topic_matches_sub(msg.topic, t):
+        if mosquitto.topic_matches_sub(t, msg.topic):
             # print "%s matches MAP(%s) => %s" % (msg.topic, t, map[t])
 
             # Must we rename the received msg topic into a different