]> git.proxmox.com Git - pve-manager.git/commitdiff
fix #3961: pveam: error on 'list' if storage doesn't exist
authorOguz Bektas <o.bektas@proxmox.com>
Mon, 13 Jun 2022 10:13:16 +0000 (12:13 +0200)
committerFabian Ebner <f.ebner@proxmox.com>
Tue, 14 Jun 2022 08:12:35 +0000 (10:12 +0200)
storage_check_enabled() already dies with an appropriate error message
so we don't have to handle it here

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
PVE/CLI/pveam.pm

index 67a912bd17dae1650869aa988d722a041d5008d6..3db2a3c88300be57fb29204adb5671299a325fec 100644 (file)
@@ -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');