From 305fc1e12a1482eed19fc65cbea1b78e4f79cf7d Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Mon, 18 Jun 2018 12:31:50 +0200 Subject: [PATCH] print_api_list: we only handle API results of type 'array' ...for now at least Signed-off-by: Thomas Lamprecht --- src/PVE/CLIHandler.pm | 2 ++ 1 file changed, 2 insertions(+) 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 = []; -- 2.39.2