Add an exception to ctest so that we do not fail when the image server
hostname is not resolvable.
TEST=Bot runs
BUG=chromium-os:20218
Change-Id: Ia506bc344ae3c4d2638acbcb617d454077328c4b
Reviewed-on: http://gerrit.chromium.org/gerrit/7617
Reviewed-by: David James <davidjames@chromium.org>
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Tested-by: Scott Zawalski <scottz@chromium.org>
(cherry picked from commit 9800919e09da83bba3b9faee03cd3e7897c7b9a7)
diff --git a/ctest/ctest.py b/ctest/ctest.py
index ed11019..3193b7a 100755
--- a/ctest/ctest.py
+++ b/ctest/ctest.py
@@ -119,7 +119,11 @@
Raises:
CrosImageDoesNotExistError if no image found using args.
"""
- url_file = urllib.urlopen(url)
+ try:
+ url_file = urllib.urlopen(url)
+ except IOError:
+ raise CrosImageDoesNotExistError('Unable to contact %s' % url)
+
url_html = url_file.read()
url_file.close()