From 67505c4c3bc326b6499ff9cf68a940068f5648b3 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Tue, 24 Apr 2012 18:31:02 +0000 Subject: [PATCH] Table.pm would die unceremoniously when faced with undefined argument, tolerate it git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12332 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/Table.pm | 1 + xCAT-server/lib/xcat/plugins/blade.pm | 1 + 2 files changed, 2 insertions(+) diff --git a/perl-xCAT/xCAT/Table.pm b/perl-xCAT/xCAT/Table.pm index 5557ebe7e..691c12841 100644 --- a/perl-xCAT/xCAT/Table.pm +++ b/perl-xCAT/xCAT/Table.pm @@ -2044,6 +2044,7 @@ sub getNodesAttribs { return dbc_call($self,'getNodesAttribs',@_); } my $nodelist = shift; + unless ($nodelist) { $nodelist = []; } #common to be invoked with undef seemingly my %options=(); my @attribs; if (ref $_[0]) { diff --git a/xCAT-server/lib/xcat/plugins/blade.pm b/xCAT-server/lib/xcat/plugins/blade.pm index 95c1fe0b9..d15675ae2 100644 --- a/xCAT-server/lib/xcat/plugins/blade.pm +++ b/xCAT-server/lib/xcat/plugins/blade.pm @@ -3695,6 +3695,7 @@ sub filter_nodes{ sub build_more_info{ my $noderange=shift; my $callback=shift; + unless ($noderange) { return []; } my $mptab = xCAT::Table->new("mp"); my @moreinfo=(); unless ($mptab) {