File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -128,13 +128,25 @@ def connection(self):
128128 """
129129 return self ._connection
130130
131+ @staticmethod
132+ def path_helper (bucket_name ):
133+ """Relative URL path for a bucket.
134+
135+ :type bucket_name: string
136+ :param bucket_name: The bucket name in the path.
137+
138+ :rtype: string
139+ :returns: The relative URL path for ``bucket_name``.
140+ """
141+ return '/b/' + bucket_name
142+
131143 @property
132144 def path (self ):
133145 """The URL path to this bucket."""
134146 if not self .name :
135147 raise ValueError ('Cannot determine path without bucket name.' )
136148
137- return '/b/' + self .name
149+ return self .path_helper ( self . name )
138150
139151 def get_blob (self , blob ):
140152 """Get a blob object by name.
Original file line number Diff line number Diff line change 2222from gcloud .exceptions import NotFound
2323from gcloud .storage .bucket import Bucket
2424from gcloud .storage .iterator import Iterator
25- import six
2625
2726
2827class Connection (_Base ):
@@ -379,7 +378,7 @@ def delete_bucket(self, bucket_name):
379378 :type bucket_name: string
380379 :param bucket_name: The bucket name to delete.
381380 """
382- bucket_path = '/b/' + bucket_name
381+ bucket_path = Bucket . path_helper ( bucket_name )
383382 self .api_request (method = 'DELETE' , path = bucket_path )
384383
385384
You can’t perform that action at this time.
0 commit comments