lib/utils/ssh.rb in lita-puppet-0.3.0 vs lib/utils/ssh.rb in lita-puppet-0.3.1
- old
+ new
@@ -25,13 +25,16 @@
exception = e
ensure
remote.disconnect
end
- result[:exception] = exception
- result[:exit_status] = output.exit_status
- result[:stdout] = output.stdout
- result[:stderr] = output.stderr
+ if exception
+ result[:exception] = exception
+ else
+ result[:exit_status] = output.exit_status
+ result[:stdout] = output.stdout
+ result[:stderr] = output.stderr
+ end
return result
end
end
end