]> git.proxmox.com Git - pve-common.git/commitdiff
print_api_list: we only handle API results of type 'array'
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 18 Jun 2018 10:31:50 +0000 (12:31 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 18 Jun 2018 10:35:04 +0000 (12:35 +0200)
...for now at least

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/CLIHandler.pm

index 2fa7933ee00574baaf860cb87fcc0f34974d7e38..6871c1fc71f4a08431ec612001f590db825ff296 100644 (file)
@@ -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 = [];