[autotest] Put dev server error strings in exceptions
We've been ignoring error messages coming back from the dev server.
Strip out the HTML that comes in (some of) them and wrap them
in exceptions.
BUG=chromium-os:30279
TEST=unit
TEST=use atest suite create to run a suite that doesn't exist on build that doesn't exist.
Change-Id: I86b149610bf54334cdca12836a078ab874c818b2
Reviewed-on: https://gerrit.chromium.org/gerrit/22315
Commit-Ready: Chris Masone <cmasone@chromium.org>
Reviewed-by: Chris Masone <cmasone@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
diff --git a/frontend/afe/site_rpc_interface.py b/frontend/afe/site_rpc_interface.py
index 818f3d1..f82731b 100644
--- a/frontend/afe/site_rpc_interface.py
+++ b/frontend/afe/site_rpc_interface.py
@@ -71,8 +71,10 @@
ds = dev_server.DevServer.create()
timings['download_started_time'] = datetime.datetime.now().strftime(
time_fmt)
- if not ds.trigger_download(build, synchronous=False):
- raise error.StageBuildFailure("Server error while staging " + build)
+ try:
+ ds.trigger_download(build, synchronous=False)
+ except dev_server.DevServerException as e:
+ raise error.StageBuildFailure(e)
timings['payload_finished_time'] = datetime.datetime.now().strftime(
time_fmt)