From 178f253092c2dd8ce5ab81089e27952b19757203 Mon Sep 17 00:00:00 2001 From: Javier Sánchez Parra Date: Thu, 22 Sep 2022 17:25:11 +0200 Subject: Always try to load servers list from config file Otherwise, servers list is not loaded if the configuration file also have an ogServer declared in the deprecated way. --- ogcp/og_server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ogcp') diff --git a/ogcp/og_server.py b/ogcp/og_server.py index 38d9a01..1b7fa32 100644 --- a/ogcp/og_server.py +++ b/ogcp/og_server.py @@ -50,7 +50,7 @@ if {'IP', 'PORT', 'API_TOKEN'} <= app.config.keys(): app.config['IP'], app.config['PORT'], app.config['API_TOKEN'])) -else: +if app.config.get('SERVERS'): for server in app.config['SERVERS']: ogserver = OGServer(server['NAME'], server['IP'], -- cgit v1.2.3-18-g5258