From 3e76b2102eaff2cc7ef3b0dd578097de19a6c447 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Wed, 29 Feb 2012 12:57:59 +0000 Subject: [PATCH] Have Client.pm tolerate callers that neglect to 'array-ify' rsp->node git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11710 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/Client.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/perl-xCAT/xCAT/Client.pm b/perl-xCAT/xCAT/Client.pm index 21bba8416..202b11c0a 100644 --- a/perl-xCAT/xCAT/Client.pm +++ b/perl-xCAT/xCAT/Client.pm @@ -955,6 +955,9 @@ sub handle_response { if (scalar @{$rsp->{node}}) { #print "printing node\n"; my $nodes=($rsp->{node}); + unless (ref $nodes eq 'ARRAY') { + $nodes = [$nodes]; + } my $node; foreach $node (@$nodes) { my $desc=$node->{name}->[0];