Commit Graph

11 Commits

Author SHA1 Message Date
Tommi Virtanen
5d5b179565 Add a utility function run.wait to wait for processes to exit. 2011-05-24 13:07:24 -07:00
Tommi Virtanen
073a4bbc18 Paramiko ChannelFile.close() didn't actually close the remote stdin.
Add a wrapper that does the calls shutdown on the channel itself,
to actually cause EOF. Add integration test using remote cat.

Move shuffling stdout bytes to background, so run.run returns before
seeing EOF on stdout, and thus actually making the stdin useful.
Similarly, don't wait for EOF on stderr before returning from run.run.
2011-05-24 13:06:00 -07:00
Tommi Virtanen
6dd4774f0a Log debug info of commands actually executed. 2011-05-24 13:01:46 -07:00
Tommi Virtanen
9c42fe6bbf Cleanup dead code. 2011-05-24 13:01:03 -07:00
Tommi Virtanen
f10668f53f Allow easy writing to stdin of remote processes. 2011-05-24 13:00:44 -07:00
Tommi Virtanen
f8f6bed680 Add run.run option wait, this will make handling stdin easier soon. 2011-05-19 15:10:04 -07:00
Tommi Virtanen
93c2e17c01 Return a structured result from run.run, to make capturing stdout/stderr easier. 2011-05-19 13:47:09 -07:00
Tommi Virtanen
df84f4e052 Check for errors on remote commands. 2011-05-19 13:05:14 -07:00
Tommi Virtanen
492fa48893 Don't close file after copying stdout/stderr to it.
If a caller uses StringIO to capture the output, they
cannot call .getvalue() after the close.

This also lets you collect multiple command outputs
into the same file.
2011-05-19 12:16:43 -07:00
Tommi Virtanen
37df5b1c39 Refactor remote running to support more use cases. 2011-05-19 10:20:32 -07:00
Tommi Virtanen
0535e4df08 Initial import 2011-05-18 14:46:49 -07:00