trying fixing stuck at downloading

This commit is contained in:
Jerry Yan 2019-05-05 14:29:58 +08:00
parent 46b3500faa
commit ef0fe2cb04

View File

@ -26,6 +26,8 @@ def download(url):
for t in p.iter_content(chunk_size=64 * 1024):
if t:
f.write(t)
else:
raise Exception("`t` is not valid")
_size = os.path.getsize(path)
Common.modifyLastDownloadStatus("Downloading >{}< @ {:.2f}%".format(path, 100.0 * _size/Common.config["p_s"]))
if _size > Common.config["p_s"] or Common.forceNotDownload: