Feat: add raise error when src does not exists

This commit is contained in:
Bertrand Benjamin 2024-01-02 22:22:58 +01:00
parent 806227f202
commit 45d343d810
1 changed files with 2 additions and 0 deletions

View File

@ -90,6 +90,8 @@ def join(src, dest, force):
if not force and Path(dest_locataire).exists():
raise ValueError(f"The file {dest_locataire} already exists")
if not Path(src).exists():
raise ValueError(f"The source directory ({src}) does not exists.")
join_excel(src, dest_charge, "*_charge.xlsx")
logging.info(f"Les données charges ont été concaténées dans {dest_charge}")
join_excel(src, dest_locataire, "*_locataire.xlsx")