diff --git a/mqtt_srv.py b/mqtt_srv.py index ade733a..4bf5701 100755 --- a/mqtt_srv.py +++ b/mqtt_srv.py @@ -18,11 +18,12 @@ import getopt import random import requests -try: + +if os.path.exists("/etc/mqtt_srv/mqtt_srv.cfg") with open("/etc/mqtt_srv/mqtt_srv.cfg") as json_file: config = json.load(json_file) print(config) -except: +else: config = {} #import psutil