diff --git a/MQTT.py b/MQTT.py index db3c92c..3747954 100644 --- a/MQTT.py +++ b/MQTT.py @@ -28,7 +28,7 @@ def valid(msg, client): # Message receiving callback def on_message(client, userdata, msg): - if valid(msg, client) is False: + if not valid(msg, client): return try: origin_data = json.loads(msg.payload.decode('utf-8'))