Skip to content

Commit

Permalink
Raise NoCommandError for missing subcommands (close fractal-analytics…
Browse files Browse the repository at this point in the history
  • Loading branch information
tcompa committed Dec 29, 2022
1 parent 7be49e6 commit 0bc2d06
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions fractal/cmd/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ async def project(
metadata_filename=kwargs.pop("metadata"),
**kwargs,
)
else:
raise NoCommandError(f"Command project {subcmd} not found")

return iface

Expand Down Expand Up @@ -94,6 +96,8 @@ async def dataset(
dataset_id=dataset_id,
dataset_update_dict=dataset_update_dict,
)
else:
raise NoCommandError(f"Command dataset {subcmd} not found")
return iface


Expand Down Expand Up @@ -144,6 +148,8 @@ async def task(
iface = await task_collection_check(client, **kwargs)
elif subcmd == "edit":
iface = await task_edit(client, **kwargs)
else:
raise NoCommandError(f"Command task {subcmd} not found")
return iface


Expand All @@ -168,6 +174,8 @@ async def workflow(
iface = await workflow_remove_task(client, **kwargs)
elif subcmd == "apply":
iface = await workflow_apply(client, **kwargs)
else:
raise NoCommandError(f"Command workflow {subcmd} not found")
return iface


Expand All @@ -180,6 +188,8 @@ async def job(
iface = await job_status(client, batch=batch, **kwargs)
elif subcmd == "download-logs":
iface = await job_download_logs(client, **kwargs)
else:
raise NoCommandError(f"Command job {subcmd} not found")
return iface


Expand Down

0 comments on commit 0bc2d06

Please sign in to comment.