[pve-devel] applied: [pve-common 1/3] PVE::CLIFormatter::print_api_result - remove parameter $format

Thomas Lamprecht t.lamprecht at proxmox.com
Tue Jul 10 14:16:58 CEST 2018


On 7/10/18 1:43 PM, Dietmar Maurer wrote:
> Instead, we pass it within $options.
> 
> Signed-off-by: Dietmar Maurer <dietmar at proxmox.com>
> ---
>  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') {
> 

applied 




More information about the pve-devel mailing list