|
@@ -57,6 +57,9 @@ def deleteObject(bucket,objectName):
|
|
|
def downloadFile(bucket,objectPath,localPath,retry=3):
|
|
|
for i in range(retry):
|
|
|
try:
|
|
|
+ if not os.path.exists(localPath):
|
|
|
+ if not os.path.exists(os.path.dirname(localPath)):
|
|
|
+ os.makedirs(os.path.dirname(localPath))
|
|
|
# bucket.get_object_to_file(objectPath, localPath)
|
|
|
oss2.resumable_download(bucket, objectPath, localPath,
|
|
|
store=oss2.ResumableDownloadStore(),
|