From f10718043ea8a82337e21370ad29d341bc057190 Mon Sep 17 00:00:00 2001 From: Claudius Heine Date: Thu, 6 Jul 2017 10:28:55 +0200 Subject: [PATCH] config: Removes file extension check for ConfigStatic The `load_config` function in the includehandler already checks for the file extension, so checking it before that, is redundant. Signed-off-by: Claudius Heine --- kas/config.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/kas/config.py b/kas/config.py index 9c08864..892b680 100644 --- a/kas/config.py +++ b/kas/config.py @@ -24,7 +24,6 @@ """ import os -import sys import logging import errno @@ -421,10 +420,7 @@ def load_config(filename, target): (_, ext) = os.path.splitext(filename) if ext == '.py': cfg = ConfigPython(filename, target) - elif ext in ['.json', '.yml']: - cfg = ConfigStatic(filename, target) else: - logging.error('Config file extenstion not recognized') - sys.exit(1) + cfg = ConfigStatic(filename, target) return cfg