aboutsummaryrefslogtreecommitdiffstats
path: root/config_file/utils.py
diff options
context:
space:
mode:
authorEugene Triguba <eugenetriguba@gmail.com>2020-01-19 14:57:37 -0600
committerEugene Triguba <eugenetriguba@gmail.com>2020-01-19 14:57:37 -0600
commit7f32dc49460875aedec9e555d0e5d27f23a3f2df (patch)
treef70688edfcf512e3e29fdd7f706391a0f99fb018 /config_file/utils.py
parentAdd start of json_parser implementaiton (diff)
parentAdd spacing (diff)
downloadconfig-file-7f32dc49460875aedec9e555d0e5d27f23a3f2df.zip
Merge branch 'master' of github.com:eugenetriguba/config_file into json
Diffstat (limited to 'config_file/utils.py')
-rw-r--r--config_file/utils.py5
1 files changed, 5 insertions, 0 deletions
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'"