Skip to content

Commit 431cb56

Browse files
Fix logic in lookup_blob to correctly return blob in bucket (#35475)
Co-authored-by: Nhon Dinh <nhon@dataxight.com>
1 parent dd9552c commit 431cb56

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sdks/python/apache_beam/io/gcp/gcsio_test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,8 @@ def lookup_blob(self, name):
174174
if name in bucket.blobs:
175175
return bucket.blobs[name]
176176
else:
177-
return bucket.create_blob(name)
177+
new_blob = bucket._create_blob(name)
178+
return bucket.add_blob(new_blob)
178179

179180
def set_default_kms_key_name(self, name):
180181
self.default_kms_key_name = name

0 commit comments

Comments
 (0)