Skip to content

Commit 243c5de

Browse files
tritonecojenco
andauthored
chore: fix get RPO sample (#1207)
* chore: fix get RPO sample There was an extra line here that doesn't make sense. Fixing based on external user feedback. * Update samples/snippets/storage_get_rpo.py Co-authored-by: cojenco <[email protected]> * remove constant import --------- Co-authored-by: cojenco <[email protected]>
1 parent 828f529 commit 243c5de

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

samples/snippets/storage_get_rpo.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
# [START storage_get_rpo]
2626

2727
from google.cloud import storage
28-
from google.cloud.storage.constants import RPO_DEFAULT
2928

3029

3130
def get_rpo(bucket_name):
@@ -34,9 +33,7 @@ def get_rpo(bucket_name):
3433
# bucket_name = "my-bucket"
3534

3635
storage_client = storage.Client()
37-
bucket = storage_client.bucket(bucket_name)
38-
39-
bucket.rpo = RPO_DEFAULT
36+
bucket = storage_client.get_bucket(bucket_name)
4037
rpo = bucket.rpo
4138

4239
print(f"RPO for {bucket.name} is {rpo}.")

0 commit comments

Comments
 (0)