Skip to content

Commit

Permalink
Remove bucket.exists call (#813)
Browse files Browse the repository at this point in the history
  • Loading branch information
ddelange authored Mar 21, 2024
1 parent 0ee055e commit 75ddaff
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions smart_open/gcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,7 @@ def Writer(bucket,

blob_open_kwargs = {**_DEFAULT_WRITE_OPEN_KWARGS, **blob_open_kwargs}

g_bucket = client.bucket(bucket)
if not g_bucket.exists():
raise google.cloud.exceptions.NotFound(f'bucket {bucket} not found')

g_blob = g_bucket.blob(
g_blob = client.bucket(bucket).blob(
blob,
chunk_size=min_part_size,
)
Expand Down

0 comments on commit 75ddaff

Please sign in to comment.