public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH v2 manager] fix #3961: pveam: error on 'list' if storage doesn't exist
@ 2022-06-13 10:13 Oguz Bektas
  2022-06-14  8:15 ` Fabian Ebner
  0 siblings, 1 reply; 2+ messages in thread
From: Oguz Bektas @ 2022-06-13 10:13 UTC (permalink / raw)
  To: pve-devel

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>
---
v1->v2:
* use storage_check_enabled() to address fabi's review


 PVE/CLI/pveam.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/PVE/CLI/pveam.pm b/PVE/CLI/pveam.pm
index 67a912bd..3db2a3c8 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');
-- 
2.30.2





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-14  8:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-13 10:13 [pve-devel] [PATCH v2 manager] fix #3961: pveam: error on 'list' if storage doesn't exist Oguz Bektas
2022-06-14  8:15 ` Fabian Ebner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal