From 243c5dea5cbd08aa0d4fd993f17ca56d65f2eeda Mon Sep 17 00:00:00 2001 From: Chris Cotter Date: Wed, 3 Jan 2024 19:08:28 -0500 Subject: [PATCH] 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 * remove constant import --------- Co-authored-by: cojenco --- samples/snippets/storage_get_rpo.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/samples/snippets/storage_get_rpo.py b/samples/snippets/storage_get_rpo.py index 29ae186fa..ab40ca3a5 100644 --- a/samples/snippets/storage_get_rpo.py +++ b/samples/snippets/storage_get_rpo.py @@ -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): @@ -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}.")