Przeglądaj źródła

Don't crash on existing bucket.

master
rewby 8 miesięcy temu
rodzic
commit
338b35e1c9
1 zmienionych plików z 3 dodań i 1 usunięć
  1. +3
    -1
      main.py

+ 3
- 1
main.py Wyświetl plik

@@ -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")


Ładowanie…
Anuluj
Zapisz