From 3225952c694706f9c19ff009cdd90019d034a09f Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Mon, 6 Apr 2020 15:48:38 +0800 Subject: [PATCH] TEST --- liveDownloader.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/liveDownloader.py b/liveDownloader.py index 9b6a91a..728af2c 100644 --- a/liveDownloader.py +++ b/liveDownloader.py @@ -23,12 +23,12 @@ def download(): f = open(path, "wb") _size = 0 try: - for t in p.iter_content(chunk_size=64 * 1024): + for T in p.iter_content(chunk_size=64 * 1024): if Common.forceNotDownload: Common.modifyLastDownloadStatus("Force Stop Download".format(path)) - return - f.write(t) - _size += len(t) + break + f.write(T) + _size += len(T) Common.modifyLastDownloadStatus( "Downloading >{}< @ {:.2f}%".format(path, 100.0 * _size / Common.config["p_s"])) if _size > Common.config["p_s"]: @@ -42,7 +42,7 @@ def download(): if os.path.getsize(path) < 1024 * 1024: Common.modifyLastDownloadStatus("Downloaded File >{}< is too small, will ignore it".format(path)) os.remove(path) - return False + break Common.encodeQueue.put(path)