Signed-off-by: Thomas Lamprecht <t.lampre...@proxmox.com>
---
 data/PVE/CLI/pvecm.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/data/PVE/CLI/pvecm.pm b/data/PVE/CLI/pvecm.pm
index 124f9cd..746bcbe 100755
--- a/data/PVE/CLI/pvecm.pm
+++ b/data/PVE/CLI/pvecm.pm
@@ -123,7 +123,7 @@ __PACKAGE__->register_method ({
                PVE::Tools::lock_file($local_cluster_lock, 10, 
\&PVE::Cluster::join, $param);
 
                if (my $err = $@) {
-                   if (ref($err) eq 'PVE::APIClient::Exception' && 
$err->{code} == 501) {
+                   if (ref($err) eq 'PVE::APIClient::Exception' && 
defined($err->{code}) && $err->{code} == 501) {
                        $err = "Remote side is not able to use API for Cluster 
join!\n" .
                               "Pass the 'use_ssh' switch or update the remote 
side.\n";
                    }
-- 
2.14.2


_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to