Feat: add raise error when src does not exists
This commit is contained in:
parent
806227f202
commit
45d343d810
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user