From d066b9519d7a0f6980d72c17f2a6ffc7eddac59a Mon Sep 17 00:00:00 2001 From: Johan Viklund Date: Fri, 8 Nov 2019 10:41:37 +0100 Subject: [PATCH] Removed config assertion to enable config-file less config The config lookup works by first checking for the
_ env var and then looking for the specified in the [
] of the config file. Checking for a specific section in the configuration then will only work if there is a configuration file, since sections are not a defined concept in the environment. The test is also unnecesary since the following var lookup will fail anyway if it's not present. --- lega/utils/amqp.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/lega/utils/amqp.py b/lega/utils/amqp.py index 81f7264ec..ef0700424 100644 --- a/lega/utils/amqp.py +++ b/lega/utils/amqp.py @@ -19,8 +19,6 @@ def get_connection(domain, blocking=True): heartbeat values are read from the CONF argument. So are the SSL options. """ - assert domain in CONF.sections(), "Section not found in config file" - LOG.info(f'Getting a connection to {domain}') params = CONF.get_value(domain, 'connection', raw=True) LOG.debug(f"Initializing a connection to: {params}")