Skip to content

Commit

Permalink
Slightly simplify backend::baseclass
Browse files Browse the repository at this point in the history
  • Loading branch information
okurz committed Oct 25, 2023
1 parent bb122a0 commit fb8c1fe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backend/baseclass.pm
Expand Up @@ -1302,7 +1302,7 @@ sub run_ssh_cmd ($self, $cmd, %args) {
my ($ssh, $chan) = $self->run_ssh($cmd, %args);
$chan->send_eof;

while (!$chan->eof) {
until ($chan->eof) {
if (my ($o, $e) = $chan->read2) {
$stdout .= $o;
$stderr .= $e;
Expand All @@ -1313,7 +1313,7 @@ sub run_ssh_cmd ($self, $cmd, %args) {
bmwqemu::diag("[run_ssh_cmd($cmd)] stderr:$/$stderr") if length($stderr);
my $ret = $chan->exit_status();
bmwqemu::diag("[run_ssh_cmd($cmd)] exit-code: $ret");
$ssh->disconnect() unless ($args{keep_open});
$ssh->disconnect() unless $args{keep_open};

return $args{wantarray} ? ($ret, $stdout, $stderr) : $ret;
}
Expand Down Expand Up @@ -1348,7 +1348,7 @@ sub stop_ssh_serial ($self) {
}

sub hide_password ($self, %args) {
$args{password} = 'SECRET' if ($args{password});
$args{password} = 'SECRET' if $args{password};
return \%args;
}

Expand Down

0 comments on commit fb8c1fe

Please sign in to comment.