From ee1ca74dec142d96c6aac937c68b66acef3eb7a0 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Thu, 28 May 2015 23:23:26 -0500 Subject: skip the wheel if it's not from the latest build --- tasks.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tasks.py') diff --git a/tasks.py b/tasks.py index 74ff6b19..76d0d029 100644 --- a/tasks.py +++ b/tasks.py @@ -47,7 +47,16 @@ def download_artifacts(session): paths = [] + last_build_number = response.json()["number"] for run in response.json()["runs"]: + if run["number"] != last_build_number: + print( + "Skipping {0} as it is not from the latest build ({1})".format( + run["url"], last_build_number + ) + ) + continue + response = session.get( run["url"] + "api/json/", headers={ -- cgit v1.2.3