Skip to content

Commit

Permalink
Fix compile_eds when run not found.
Browse files Browse the repository at this point in the history
When a folder-based experiment was not found by compile_eds, it raised the wrong error.  It now raises FileNotFoundError.  This fixes a monitor bug.
  • Loading branch information
cgevans committed Nov 25, 2024
1 parent 31f7e0e commit 5861918
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/qslib/qsconnection_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,10 @@ async def compile_eds(self, run_name: str) -> None:

results = [r for r in expfiles if r["path"] == run_name]

if len(results) != 1:
raise ValueError
if len(results) == 0:
raise FileNotFoundError(run_name)
elif len(results) > 1:
raise ValueError(f"Multiple runs with name {run_name}: {results}")
res = results[0]

if "run" not in res:
Expand Down

0 comments on commit 5861918

Please sign in to comment.