From: Thomas Lamprecht Date: Mon, 18 Jun 2018 10:31:50 +0000 (+0200) Subject: print_api_list: we only handle API results of type 'array' X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=commitdiff_plain;h=305fc1e12a1482eed19fc65cbea1b78e4f79cf7d;hp=85b9def289c52e768cc6aea99687f75211952646 print_api_list: we only handle API results of type 'array' ...for now at least Signed-off-by: Thomas Lamprecht --- diff --git a/src/PVE/CLIHandler.pm b/src/PVE/CLIHandler.pm index 2fa7933..6871c1f 100644 --- a/src/PVE/CLIHandler.pm +++ b/src/PVE/CLIHandler.pm @@ -466,6 +466,8 @@ sub print_entry { sub print_api_list { my ($props_to_print, $data, $returninfo) = @_; + die "can only print array result" if $returninfo->{type} ne 'array'; + my $returnprops = $returninfo->{items}->{properties}; my $formatopts = [];