We should be raising an AutoservRunError here, not a CmdError.

Signed-off-by: John Admanski <jadmanski@google.com>

To make it a little clearer why this change is actually needed, CmdError actually expects two parameters: the command being executed and the (non-zero) exit code of the command, because a CmdError basically means "the command was executed, but then indicated a failure". It's not a generic "something went wrong when trying to execute a command" error.

So, basically: CmdError doesn't work properly when we just pass it a message instead of a command and exit status, and rather than changing CmdError to handle this special type of failure it's much simpler to just throw a different type of exception. And since the doc for AutoservRunError is basically "an error occurred while using run on the server" it seems appropriate. 



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1133 592f7852-d20e-0410-864c-8624ca9c26a4
1 file changed