From 9249d9233557912d952e1722d013ae6680e6a26d Mon Sep 17 00:00:00 2001 From: lissav Date: Fri, 7 Nov 2008 16:53:49 +0000 Subject: [PATCH] fix handling of error output git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2476 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/SINV.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/perl-xCAT/xCAT/SINV.pm b/perl-xCAT/xCAT/SINV.pm index 71920a29f..e0bdb0c7a 100644 --- a/perl-xCAT/xCAT/SINV.pm +++ b/perl-xCAT/xCAT/SINV.pm @@ -439,6 +439,8 @@ sub parse_and_run_sinv # and then return inline after this code. $processflg = "seednode"; + @errresult = (); + @cmdresult = (); $sub_req->( { command => [$cmdtype], @@ -478,6 +480,8 @@ sub parse_and_run_sinv # and still support a hierarchial xdsh # this will run the command with input, return to cmdoutput routine # and then return inline after this code. + @errresult = (); + @cmdresult = (); $sub_req->( { command => [$cmdtype], @@ -1263,8 +1267,6 @@ sub xdshoutput my $rsp = shift; my $rc = 0; - @errresult = (); - @cmdresult = (); # Handle info structure, like xdsh returns if ($rsp->{warning}) @@ -1312,8 +1314,6 @@ sub rinvoutput { my $rsp = shift; - @errresult = (); - @cmdresult = (); # Handle node structure, like rinv returns my $errflg = 0; @@ -1462,7 +1462,7 @@ sub storeresults my $i=0; foreach my $line (@errresult) { - $rsp->{data}->[$i] = $line; + $rsp->{data}->[$i] = "$line"; $i++; } xCAT::MsgUtils->message("E", $rsp, $callback);