kvm.pm: clean up error handling for programmatic control (i.e. MSM)

Client.pm: clean up warnings in logfile


git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4658 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
cridye 2009-11-23 22:30:09 +00:00
parent 2b438af097
commit fc37e3ea2f
2 changed files with 2 additions and 1 deletions

View File

@ -168,7 +168,7 @@ sub submit_request {
#add ESC back
foreach my $key (keys %$rsp) {
if (ref($rsp->{$key}) eq 'ARRAY') { foreach my $text (@{$rsp->{$key}}) { $text =~ s/xxxxESCxxxx/\e/g; } }
if (ref($rsp->{$key}) eq 'ARRAY') { foreach my $text (@{$rsp->{$key}}) { next unless defined $text; $text =~ s/xxxxESCxxxx/\e/g; } }
else { $rsp->{$key} =~ s/xxxxESCxxxx/\e/g; }
}

View File

@ -1425,6 +1425,7 @@ sub dohyp {
$output{node}->[0]->{errorcode} = $rc;
$output{node}->[0]->{name}->[0]=$node;
$output{node}->[0]->{data}->[0]->{contents}->[0]=$text;
$output{node}->[0]->{error} = $text unless $rc == 0;
print $out freeze([\%output]);
print $out "\nENDOFFREEZE6sK4ci\n";
yield();