From 6201490e8a2f0b8116384e44e3db94218e1b3b3f Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Sat, 18 May 2024 22:19:44 -0700 Subject: [PATCH] cli: Handle empty deps in list-dependencies --- bioluigi/cli.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bioluigi/cli.py b/bioluigi/cli.py index 9db682a..9fed90b 100755 --- a/bioluigi/cli.py +++ b/bioluigi/cli.py @@ -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: