Skip to content

Commit d39c88b

Browse files
authored
Fix empty string case. (#634)
1 parent a3f9ce9 commit d39c88b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

datashuttle/configs/load_configs.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,13 @@ def convert_str_and_pathlib_paths(
8989
for path_key in canonical_configs.keys_str_on_file_but_path_in_class():
9090
value = config_dict[path_key]
9191

92-
if value:
92+
if value is not None:
93+
if value == "":
94+
utils.log_and_raise_error(
95+
f"{path_key} cannot be an empty string.",
96+
ValueError,
97+
)
98+
9399
if direction == "str_to_path":
94100
config_dict[path_key] = Path(value)
95101

0 commit comments

Comments
 (0)