From 61a687ac13402a028fa9bf31389537bca23cc2a0 Mon Sep 17 00:00:00 2001 From: Oguz Bektas Date: Mon, 13 Jun 2022 12:13:16 +0200 Subject: [PATCH] fix #3961: pveam: error on 'list' if storage doesn't exist storage_check_enabled() already dies with an appropriate error message so we don't have to handle it here Signed-off-by: Oguz Bektas --- PVE/CLI/pveam.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PVE/CLI/pveam.pm b/PVE/CLI/pveam.pm index 67a912bd1..3db2a3c88 100644 --- a/PVE/CLI/pveam.pm +++ b/PVE/CLI/pveam.pm @@ -122,6 +122,8 @@ __PACKAGE__->register_method ({ my $cfg = PVE::Storage::config(); + PVE::Storage::storage_check_enabled($cfg, $storeid); + die "Storage does not support templates!\n" if !$cfg->{ids}->{$storeid}->{content}->{vztmpl}; my $vollist = PVE::Storage::volume_list($cfg, $storeid, undef, 'vztmpl');