From 41b34ff9cb5d5e4d734c72b526dafc73db754926 Mon Sep 17 00:00:00 2001 From: lissav Date: Thu, 9 Aug 2012 16:14:44 +0000 Subject: [PATCH] add check if nodetype defined git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13477 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/Utils.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/perl-xCAT/xCAT/Utils.pm b/perl-xCAT/xCAT/Utils.pm index 854271c11..5f5e32c52 100644 --- a/perl-xCAT/xCAT/Utils.pm +++ b/perl-xCAT/xCAT/Utils.pm @@ -2918,10 +2918,12 @@ sub noderangecontainsMn my $tab = xCAT::Table->new('nodetype'); my @nodelist=$tab->getAllNodeAttribs(['node','nodetype']); foreach my $n (@nodelist) { + if (defined($n->{'nodetype'})) { if ($n->{'nodetype'} eq "mn") { # this is the MN $mname=$n->{'node'}; last; } + } } if (grep(/$mname/, @noderange)) { # if MN in the noderange return $mname;