We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c490b68 + 4ea060a commit 2e20f26Copy full SHA for 2e20f26
1 file changed
gcloud/storage/bucket.py
@@ -101,8 +101,9 @@ def __repr__(self):
101
def __iter__(self):
102
return iter(self._iterator_class(bucket=self))
103
104
- def __contains__(self, blob):
105
- return self.get_blob(blob) is not None
+ def __contains__(self, blob_name):
+ blob = Blob(blob_name, bucket=self)
106
+ return blob.exists()
107
108
def exists(self):
109
"""Determines whether or not this bucket exists.
0 commit comments