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)