From 824a111192a16bcf3c8fda9150a6879dcad3488c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= Date: Thu, 3 Apr 2025 18:30:34 +0900 Subject: [PATCH] results: Fix dashboard_fetch_tree_list() invocation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit d45d0db ("Format error as json when using --json") added a new positional argument called "use_json" to the dashboard_api_fetch() method while fixing something else. As part of the change, most of the callers of the dashboard_api_fetch(), such as the dashboard_fetch_tree_list() helper, were updated to correctly pass the new argument around. However, the cmd_list_trees() was not updated to pass the new argument correctly to the aforementioned helper function, which it uses internally. As such, when using kci-dev with the "results trees" subcommand, this results in a TypeError as follows: TypeError: dashboard_fetch_tree_list() missing 1 required positional argument: 'use_json' Thus, add the missing argument when invoking dashboard_fetch_tree_list() to fix the subcommand invocation error. Signed-off-by: Krzysztof WilczyƄski --- kcidev/subcommands/results/parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kcidev/subcommands/results/parser.py b/kcidev/subcommands/results/parser.py index 9b25a10..f085e9b 100644 --- a/kcidev/subcommands/results/parser.py +++ b/kcidev/subcommands/results/parser.py @@ -125,7 +125,7 @@ def get_command_summary(command_data): def cmd_list_trees(origin, use_json): - trees = dashboard_fetch_tree_list(origin) + trees = dashboard_fetch_tree_list(origin, use_json) if use_json: kci_msg(json.dumps(list(map(lambda t: create_tree_json(t), trees)))) return