File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
Expand file tree Collapse file tree 2 files changed +14
-2
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 @@ -379,7 +379,7 @@ def delete_bucket(self, bucket_name):
379379 :type bucket_name: string
380380 :param bucket_name: The bucket name to delete.
381381 """
382- bucket_path = '/b/' + bucket_name
382+ bucket_path = Bucket . path_helper ( bucket_name )
383383 self .api_request (method = 'DELETE' , path = bucket_path )
384384
385385
You can’t perform that action at this time.
0 commit comments