diff options
author | Paul Sokolovsky <paul.sokolovsky@linaro.org> | 2014-06-23 19:25:57 +0300 |
---|---|---|
committer | Paul Sokolovsky <paul.sokolovsky@linaro.org> | 2015-11-02 22:33:26 +0300 |
commit | e8b12f9ecfa702cfc6e4b2eed605e4ab1d41685f (patch) | |
tree | 8b5d67a8fb445573280f2654b16c3021e5ece85c | |
parent | 06b13aed21304fa062ae1fd43e26311bd58e2311 (diff) |
find_latest.py: Report no latest build found more appropriately.
Previously, there was low-level exception on list.pop().
-rwxr-xr-x | find_latest.py | 2 |
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) |