From d3488691d4d5d6a8ac750efe42ec24f037dbd1bc Mon Sep 17 00:00:00 2001 From: Stuart Mumford Date: Mon, 28 May 2018 19:14:29 +0100 Subject: [PATCH] split the config loader into file and toml parts --- src/towncrier/_settings.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/towncrier/_settings.py b/src/towncrier/_settings.py index 609b7204..83299800 100644 --- a/src/towncrier/_settings.py +++ b/src/towncrier/_settings.py @@ -28,6 +28,10 @@ def load_config(from_dir): with open(fn, 'r') as conffile: config = toml.load(conffile) + return parse_toml(config) + + +def parse_toml(config): if 'tool' not in config: raise ValueError("No [tool.towncrier] section.")