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
diff --git a/server/utils.py b/server/utils.py
index 88862c3..d3217c4 100644
--- a/server/utils.py
+++ b/server/utils.py
@@ -188,7 +188,8 @@
 	# kill it via an escalating series of signals.
 	if not pid:
 		__nuke_subprocess(subproc)
-	raise CmdError('Command not complete within %s seconds' % timeout)
+	raise AutoservRunError('Command not complete within %s seconds'
+			       % timeout)
 
 
 def run(command, timeout=None, ignore_status=False,