瀏覽代碼

Don't crash on existing bucket.

master
rewby 9 月之前
父節點
當前提交
338b35e1c9
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. +3
    -1
      main.py

+ 3
- 1
main.py 查看文件

@@ -196,7 +196,9 @@ def single_impl(item_directory: pathlib.Path, ia_collection: str, ia_item_title:
def make_bucket():
logging.info("Attempting to make bucket...")
if client.bucket_exists(bucket_name=bucket_name):
raise Exception("Bucket already exists!")
# If bucket already exists a previous attempt was aborted.
logging.warning("Bucket already exists!")
return
client.make_bucket(bucket_name=bucket_name)

retry_failures(make_bucket, "Failed to make bucket")


Loading…
取消
儲存