throw error if library path is not found in get_db_file

This commit is contained in:
Justus Kuhlmann 2026-05-05 16:21:05 +02:00
commit 2f83c1f9cb
Signed by: jkuhl
GPG key ID: 00ED992DD79B85A6

View file

@ -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):