diff --git a/MQTT.py b/MQTT.py index 56816f7..8d7954c 100644 --- a/MQTT.py +++ b/MQTT.py @@ -23,9 +23,7 @@ def valid(msg, client): if 'device_name' not in origin_data: client.publish('error', payload='device_name must be supplied', qos=0) return False - client.publish('error', payload=origin_data['device_name'], qos=0) - client.publish('error', payload=device_name, qos=0) - if origin_data['device_name'] != 'test': + if origin_data['device_name'] != device_name: return False return True diff --git a/test.py b/test.py deleted file mode 100644 index f4c5973..0000000 --- a/test.py +++ /dev/null @@ -1,3 +0,0 @@ -import os - -print('test' == os.getenv('device_name')) \ No newline at end of file