summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Sokolovsky <paul.sokolovsky@linaro.org>2014-06-23 19:25:57 +0300
committerPaul Sokolovsky <paul.sokolovsky@linaro.org>2015-11-02 22:33:26 +0300
commite8b12f9ecfa702cfc6e4b2eed605e4ab1d41685f (patch)
tree8b5d67a8fb445573280f2654b16c3021e5ece85c
parent06b13aed21304fa062ae1fd43e26311bd58e2311 (diff)
downloadlci-build-tools-e8b12f9ecfa702cfc6e4b2eed605e4ab1d41685f.tar.gz
find_latest.py: Report no latest build found more appropriately.
Previously, there was low-level exception on list.pop().
-rwxr-xr-xfind_latest.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/find_latest.py b/find_latest.py
index 7441a4e..1b7cb26 100755
--- a/find_latest.py
+++ b/find_latest.py
@@ -69,6 +69,8 @@ def find_latest(url):
dates = find_builds(builddates)
dates = [int(date) for date in dates]
dates.sort()
+ if not dates:
+ raise ValueError("No builds found at index url: " + url)
lastdate = dates.pop()
lastdate = str(lastdate) + "/"
latesturl = urlparse.urljoin(url, lastdate)