add check for directory in config loader
This commit is contained in:
@@ -14,6 +14,9 @@ def load_toml(
|
||||
|
||||
if not path_to_toml.exists():
|
||||
raise FileNotFoundError(f"Config file seems not to exist under: >{path_to_toml}<")
|
||||
if not path_to_toml.is_file():
|
||||
raise ValueError("Object to which path points must be a file.")
|
||||
|
||||
path_to_toml = path_to_toml.with_suffix(".toml")
|
||||
|
||||
with open(path_to_toml, "rb") as f:
|
||||
|
||||
Reference in New Issue
Block a user