From a940a8d6b3db7e845f25cedf3c5d70f03dba9eea Mon Sep 17 00:00:00 2001 From: kelvinben Date: Thu, 3 Dec 2020 10:27:51 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E4=BF=AE=E5=A4=8D=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E4=BF=AE=E6=AD=A3=E5=90=8E=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E5=8F=8D=E7=BC=96=E8=AF=91=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libs/task/base_task.py | 5 ++++- libs/task/download_task.py | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libs/task/base_task.py b/libs/task/base_task.py index a06bb99..0995312 100644 --- a/libs/task/base_task.py +++ b/libs/task/base_task.py @@ -74,8 +74,11 @@ class BaseTask(object): cache_info = DownloadTask().start(self.path,self.types) cacar_path = cache_info["path"] types = cache_info["type"] + + print(os.path.exists(cacar_path)) + print(cores.download_flag) - if not (os.path.exists(cacar_path) and cores.download_flag): + if (not os.path.exists(cacar_path) and cores.download_flag): print("[-] File download failed! Please download the file manually and try again.") return task_info diff --git a/libs/task/download_task.py b/libs/task/download_task.py index 4fbed69..abc29eb 100644 --- a/libs/task/download_task.py +++ b/libs/task/download_task.py @@ -33,9 +33,9 @@ class DownloadTask(object): if not(path.startswith("http://") or path.startswith("https://")): if not os.path.isdir(path): - return {"path":self.path,"type":types} + return {"path":path,"type":types} else: - return {"path":self.path,"type":self.types} + return {"path":path,"type":types} else: print("[*] Detected that the task is not local, preparing to download file......") cache_path = os.path.join(cores.download_path, file_name)