This changes LocalHost and ParamikoHost to handle command timeouts
in a manner consistent with that of utils and SSHHost, the latter
two being the "original" implementations of run().
In this case, consistent means:
- they raise the same type of exception for both command failures
(i.e. non-zero exit status) and a command timeout
- the exception for the command timeout is always raised on a
timeout even if ignore_status=True
I'm reluctant to make more far-reaching changes after seeing at a
lot of code where a standard pattern seems to be to use
ignore_status when you don't care about the exit code, and to use
a try-except when you don't care about failure at all.
Risk: Low
Visibility: ParamikoHost.run and LocalHost.run should behave more like
utils.run and SSHHost.run wrt exception timeouts.
Signed-off-by: John Admanski <jadmanski@google.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@3849 592f7852-d20e-0410-864c-8624ca9c26a4
2 files changed