all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Oguz Bektas <o.bektas@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager] fix #3961: pveam: error if storage doesn't exist on 'list'
Date: Mon, 28 Mar 2022 11:53:30 +0200	[thread overview]
Message-ID: <20220328095330.512901-1-o.bektas@proxmox.com> (raw)

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
---
 PVE/CLI/pveam.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/PVE/CLI/pveam.pm b/PVE/CLI/pveam.pm
index 6c26f209..0ad33823 100644
--- a/PVE/CLI/pveam.pm
+++ b/PVE/CLI/pveam.pm
@@ -122,6 +122,8 @@ __PACKAGE__->register_method ({
 
 	my $cfg = PVE::Storage::config();
 
+	die "Storage does not exist!\n" if !defined($cfg->{ids}->{$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





             reply	other threads:[~2022-03-28  9:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-28  9:53 Oguz Bektas [this message]
2022-06-08 10:22 ` Oguz Bektas
2022-06-10  7:36 ` Fabian Ebner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220328095330.512901-1-o.bektas@proxmox.com \
    --to=o.bektas@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal