From 179b808de6be97e69fa5b3da3cb68999971571bb Mon Sep 17 00:00:00 2001 From: JerryYan ECS Date: Tue, 12 Mar 2019 20:51:37 +0800 Subject: [PATCH] Fix : while upload file is missing, uploader will pass the file --- liveDownloader.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/liveDownloader.py b/liveDownloader.py index 418b69e..f96e59c 100644 --- a/liveDownloader.py +++ b/liveDownloader.py @@ -146,6 +146,8 @@ def upload(date=datetime.strftime(datetime.now(), "%Y_%m_%d")): b.clear() break print("{} : Upload {}".format(datetime.strftime(datetime.now(), "%y%m%d %H%M"), i)) + if not os.path.exist(i): + continue try: b.preUpload(VideoPart(i, os.path.basename(i))) except: