develop #41

Merged
jkuhl merged 210 commits from develop into master 2026-05-07 16:01:02 +02:00
Showing only changes of commit 6c99653fff - Show all commits

check whether paths exist for import

Justus Kuhlmann 2026-05-05 16:26:02 +02:00
Signed by: jkuhl
GPG key ID: 00ED992DD79B85A6

View file

@ -158,6 +158,10 @@ def import_toml(path: Path, file: str, copy_file: bool=True) -> None:
copy_file: bool, optional
Whether the toml-files will be copied into the library. Default is True.
"""
if not os.path.exists(path):
raise FileNotFoundError(f"Corrlib path {path} does not exist.")
if not os.path.exists(file):
raise FileNotFoundError(f".toml-file {file} does not exist.")
print("Import project as decribed in " + file)
with open(file, 'rb') as fp:
toml_dict = toml.load(fp)