Add an exception to ctest so that we do not fail when the image server
hostname is not resolvable.
TEST=NA
BUG=chromium-os:20218
Change-Id: I64e9aa2adf61d20e4d0117666a799dc7b1f7f72d
diff --git a/ctest/ctest.py b/ctest/ctest.py
index f9e9057..bf2d172 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()