Skip to content

Commit

Permalink
chore: fix get RPO sample (#1207)
Browse files Browse the repository at this point in the history
* 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 <cathyo@google.com>

* remove constant import

---------

Co-authored-by: cojenco <cathyo@google.com>
  • Loading branch information
tritone and cojenco committed Jan 4, 2024
1 parent 828f529 commit 243c5de
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions samples/snippets/storage_get_rpo.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
# [START storage_get_rpo]

from google.cloud import storage
from google.cloud.storage.constants import RPO_DEFAULT


def get_rpo(bucket_name):
Expand All @@ -34,9 +33,7 @@ def get_rpo(bucket_name):
# bucket_name = "my-bucket"

storage_client = storage.Client()
bucket = storage_client.bucket(bucket_name)

bucket.rpo = RPO_DEFAULT
bucket = storage_client.get_bucket(bucket_name)
rpo = bucket.rpo

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

0 comments on commit 243c5de

Please sign in to comment.