Skip to content

Commit 8ee2a01

Browse files
authored
[Storage] Add comment to clarify which package version is necessary (GoogleCloudPlatform#2315)
* Add comment to clarify which package version * Lint and add another comment to related sample
1 parent 3cfb2cb commit 8ee2a01

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

storage/cloud-client/snippets.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ def list_buckets():
113113
def list_blobs(bucket_name):
114114
"""Lists all the blobs in the bucket."""
115115
storage_client = storage.Client()
116+
117+
# Note: Client.list_blobs requires at least package version 1.17.0.
116118
blobs = storage_client.list_blobs(bucket_name)
117119

118120
for blob in blobs:
@@ -142,6 +144,8 @@ def list_blobs_with_prefix(bucket_name, prefix, delimiter=None):
142144
143145
"""
144146
storage_client = storage.Client()
147+
148+
# Note: Client.list_blobs requires at least package version 1.17.0.
145149
blobs = storage_client.list_blobs(bucket_name, prefix=prefix,
146150
delimiter=delimiter)
147151

0 commit comments

Comments
 (0)