Skip to content

Commit

Permalink
cli: Handle empty deps in list-dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
arteymix committed May 19, 2024
1 parent 5a456d3 commit 6201490
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bioluigi/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,15 @@ def list_dependencies(task_id, status, summary, detailed, extract_id, extract_pa
List all the dependencies of the given task ID.
"""
deps = rpc('dep_graph', task_id=task_id)
if not deps:
click.echo(f'No dependencies for task {task_id}.')
return
fix_tasks_dict(deps)
if status:
deps = {dep_id: deps[dep_id] for dep_id in deps if deps[dep_id]['status'] in status}
if not deps:
click.echo(f'No dependencies for task {task_id} with status: {", ".join(status)}.')
return
if summary:
formatter = TasksSummaryFormatter()
elif detailed:
Expand Down

0 comments on commit 6201490

Please sign in to comment.