瀏覽代碼

fix(storage): 🐛 HeadBucket Operation Permission (#7733)

Co-authored-by: 莫岳恒 <moyueheng@datagrand.com>
tags/0.7.3
Vimpas 1 年之前
父節點
當前提交
4682e0ac7c
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 3 行新增0 行删除
  1. 3
    0
      api/extensions/storage/s3_storage.py

+ 3
- 0
api/extensions/storage/s3_storage.py 查看文件

# if bucket not exists, create it # if bucket not exists, create it
if e.response["Error"]["Code"] == "404": if e.response["Error"]["Code"] == "404":
self.client.create_bucket(Bucket=self.bucket_name) self.client.create_bucket(Bucket=self.bucket_name)
# if bucket is not accessible, pass, maybe the bucket is existing but not accessible
elif e.response["Error"]["Code"] == "403":
pass
else: else:
# other error, raise exception # other error, raise exception
raise raise

Loading…
取消
儲存