print_api_list: we only handle API results of type 'array'

...for now at least

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2018-06-18 12:31:50 +02:00
parent 85b9def289
commit 305fc1e12a

View 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 = [];