From 1bf1bb852d08a6bdd5dc53a09d3118eec65beb06 Mon Sep 17 00:00:00 2001 From: Vincent Michel Date: Wed, 30 Aug 2017 14:22:43 +0200 Subject: [PATCH] Remove DEFAULTS from config --- handel/interface.py | 2 +- tests/test_interface.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/handel/interface.py b/handel/interface.py index d843c4b..4d27ade 100644 --- a/handel/interface.py +++ b/handel/interface.py @@ -366,4 +366,4 @@ def get_config(filename): config = configparser.ConfigParser( comment_prefixes=['START', 'END', '#', '*****']) config.read(filename) - return {key: dict(section) for section in config.items()} + return {section: dict(config[section]) for section in config.sections()} diff --git a/tests/test_interface.py b/tests/test_interface.py index 502f676..4fdff18 100644 --- a/tests/test_interface.py +++ b/tests/test_interface.py @@ -468,3 +468,4 @@ def test_get_config(interface): filename = interface.get_config_files('.')[0] d = interface.get_config(filename) assert d['detector definitions']['alias'] == 'detector1' + assert 'DEFAULT' not in d -- GitLab