From f0bcf4d4c66b316a7e29d94397412bef179e7f21 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Tue, 10 Jul 2018 13:51:26 +0200 Subject: [PATCH] PVE::CLIFormatter::print_api_result - remove parameter $format Instead, we pass it within $options. Signed-off-by: Dietmar Maurer --- src/PVE/CLIFormatter.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/PVE/CLIFormatter.pm b/src/PVE/CLIFormatter.pm index 653a99f..043ce49 100644 --- a/src/PVE/CLIFormatter.pm +++ b/src/PVE/CLIFormatter.pm @@ -364,7 +364,7 @@ sub print_api_list { } sub print_api_result { - my ($format, $data, $result_schema, $props_to_print, $options) = @_; + my ($data, $result_schema, $props_to_print, $options) = @_; return if $options->{quiet}; @@ -374,6 +374,8 @@ sub print_api_result { $options = { %$options }; # copy } + my $format = $options->{format} // 'text'; + return if $result_schema->{type} eq 'null'; if ($format eq 'json') { -- 2.39.2