Просмотр исходного кода

Don't crash on existing bucket.

master
rewby 9 месяцев назад
Родитель
Сommit
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")


Загрузка…
Отмена
Сохранить