diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | lib/ssh.exp | 4 |
2 files changed, 7 insertions, 1 deletions
@@ -1,3 +1,7 @@ +2016-04-15 Ben Elliston <bje@gnu.org> + + * lib/ssh.exp (ssh_exec): Handle regexp return status. + 2016-04-13 Ben Elliston <bje@gnu.org> * lib/rsh.exp (rsh_exec): Improve verbose message. diff --git a/lib/ssh.exp b/lib/ssh.exp index 8273af4..5487589 100644 --- a/lib/ssh.exp +++ b/lib/ssh.exp @@ -186,7 +186,9 @@ proc ssh_exec { boardname program pargs inp outp } { regsub "XYZ(\[0-9\]*)ZYX\n?" $output "" output return [list $status "$SSH to $boardname failed for $program, $output"] } - regexp "XYZ(\[0-9\]*)ZYX" $output junk status + if { [regexp "XYZ(\[0-9\]*)ZYX" $output junk status] == 0 } { + set status "" + } verbose "ssh_exec: status:$status text:$output" 4 if { $status == "" } { return [list -1 "Couldn't parse $SSH output, $output."] |