summaryrefslogtreecommitdiff
path: root/tsp/scripts
diff options
context:
space:
mode:
authorAleksander Mistewicz <a.mistewicz@samsung.com>2017-01-18 13:00:20 (GMT)
committerAleksander Mistewicz <a.mistewicz@samsung.com>2017-03-29 10:48:09 (GMT)
commitc2ad3d8ed63990256c331f93c1b14fb57ef72e61 (patch)
tree0604514a43a94b6c63e1e63d2b1f8b7e54253839 /tsp/scripts
parenta0ec822f78e6a095953eaa5e1803b945c9d7635e (diff)
downloadmajor-c2ad3d8ed63990256c331f93c1b14fb57ef72e61.zip
major-c2ad3d8ed63990256c331f93c1b14fb57ef72e61.tar.gz
major-c2ad3d8ed63990256c331f93c1b14fb57ef72e61.tar.bz2
Workaround download_all missing md5sumrefs/changes/26/121926/1
Change-Id: Iac3704084632658c5d0990fed43f3993a4b06a82
Diffstat (limited to 'tsp/scripts')
-rwxr-xr-xtsp/scripts/download_all.py21
1 files changed, 12 insertions, 9 deletions
diff --git a/tsp/scripts/download_all.py b/tsp/scripts/download_all.py
index 9489ca1..a2a67a7 100755
--- a/tsp/scripts/download_all.py
+++ b/tsp/scripts/download_all.py
@@ -184,17 +184,20 @@ class Downloader(threading.Thread):
sub_dwns.add(subprocess.Popen(["wget", "-cq", url], cwd=self.name))
for sub_dwn in sub_dwns:
sub_dwn.wait()
- r = self.session.head(md5sums)
- if r.status_code == requests.codes.ok:
- if self.check_md5(md5sums):
+ if md5sums:
+ r = self.session.head(md5sums)
+ if r.status_code == requests.codes.ok:
+ if self.check_md5(md5sums):
+ break
+ elif r.status_code == 404:
+ logging.debug("MD5SUMS missing: %s", md5sums)
break
- elif r.status_code == 404:
- logging.debug("MD5SUMS missing: %s", md5sums)
- break
+ else:
+ logging.warn("MD5SUMS error: %s", md5sums)
+ if self.work.is_set():
+ time.sleep(10)
else:
- logging.warn("MD5SUMS error: %s", md5sums)
- if self.work.is_set():
- time.sleep(10)
+ break
logging.info("Stop downloader: %s" % self.name)