From 2117c36ab0953f69945275e9bc5bfece4c14a26b Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Sun, 19 Jan 2020 13:20:57 -0600 Subject: Add save() and reset() methods to ConfigFile Test coverage on other files has also been increased --- config_file/utils.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'config_file/utils.py') diff --git a/config_file/utils.py b/config_file/utils.py index 41ce2a5..61f0ae0 100644 --- a/config_file/utils.py +++ b/config_file/utils.py @@ -8,6 +8,11 @@ def split_on_dot(line: str, only_last_dot=False): :raises ValueError: if the line does not have a dot. """ if "." not in line: + # TODO: This is used in the parser for section.keys where a more specific + # error message would be nice, but it is only used more generically to, say, + # split a file path. We may just have to insert some try-catches to catch the + # ValueError and insert a more specific error message or create a custom error + # for this method? raise ValueError( "section_key must contain the section and key separated by a dot. " + "e.g. 'section.key'" -- cgit v1.2.3