部分改进:下载文件大小为0时,删除文件并不上传该文件
This commit is contained in:
parent
9316b1e855
commit
9a74b2b6e5
@ -11,7 +11,7 @@ q = queue.Queue()
|
|||||||
base_uri = ""
|
base_uri = ""
|
||||||
isUpload = False
|
isUpload = False
|
||||||
uq = queue.Queue()
|
uq = queue.Queue()
|
||||||
eq = queue.Queue()
|
|
||||||
|
|
||||||
class downloader(XiGuaLiveApi):
|
class downloader(XiGuaLiveApi):
|
||||||
files = []
|
files = []
|
||||||
@ -89,6 +89,9 @@ def download(url):
|
|||||||
print("{} : Download Quiting With Exception {}".format(datetime.strftime(datetime.now(), "%y%m%d %H%M"),e.__str__()))
|
print("{} : Download Quiting With Exception {}".format(datetime.strftime(datetime.now(), "%y%m%d %H%M"),e.__str__()))
|
||||||
f.close()
|
f.close()
|
||||||
isUpload = True
|
isUpload = True
|
||||||
|
if os.path.getsize(path) == 0:
|
||||||
|
os.remove(path)
|
||||||
|
return False
|
||||||
uq.put(path)
|
uq.put(path)
|
||||||
download(url)
|
download(url)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user