check if param file exists
This commit is contained in:
parent
4b1c213090
commit
07fdc1ba6a
1 changed files with 2 additions and 0 deletions
|
|
@ -31,6 +31,8 @@ def load_ms1_infile(path: Path, project: str, file_in_project: str) -> dict[str,
|
|||
"""
|
||||
|
||||
file = os.path.join(path, "projects", project, file_in_project)
|
||||
if not os.path.exists(file):
|
||||
raise IOError(f"File {file} does not exist.")
|
||||
ds = os.path.join(path, "projects", project)
|
||||
dl.get(file, dataset=ds)
|
||||
with open(file, 'r') as fp:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue