throw error if library path is not found in get_db_file
This commit is contained in:
parent
4e3327709e
commit
2f83c1f9cb
1 changed files with 2 additions and 0 deletions
|
|
@ -115,6 +115,8 @@ def get_db_file(path: Path) -> Path:
|
||||||
db_file: str
|
db_file: str
|
||||||
The file holding the database.
|
The file holding the database.
|
||||||
"""
|
"""
|
||||||
|
if not os.path.exists(path):
|
||||||
|
raise FileNotFoundError(f"Corrlib path {path} does not exist.")
|
||||||
config_path = os.path.join(path, CONFIG_FILENAME)
|
config_path = os.path.join(path, CONFIG_FILENAME)
|
||||||
config = ConfigParser()
|
config = ConfigParser()
|
||||||
if os.path.exists(config_path):
|
if os.path.exists(config_path):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue