Delete initial file config.txt

pull/3/head
remittor 4 years ago
parent 81677fd24d
commit 07a19bf49a

@ -1,3 +0,0 @@
{
"device_ip_addr": "192.168.1.1"
}

@ -206,8 +206,11 @@ class Gateway():
def load_config(self):
self.config = {}
with open('config.txt', 'r') as file:
self.config = json.load(file)
if os.path.exists('config.txt'):
with open('config.txt', 'r') as file:
self.config = json.load(file)
if not "device_ip_addr" in self.config:
self.config['device_ip_addr'] = "192.168.1.1"
self.config['device_ip_addr'] = (self.config['device_ip_addr']).strip()
def save_config(self):

Loading…
Cancel
Save