From ef0fe2cb0477c58b52b682d4ff5b95dd2d118758 Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Sun, 5 May 2019 14:29:58 +0800 Subject: [PATCH] trying fixing stuck at downloading --- liveDownloader.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/liveDownloader.py b/liveDownloader.py index a87f7d0..3f6c762 100644 --- a/liveDownloader.py +++ b/liveDownloader.py @@ -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: