@@ -171,7 +171,7 @@ def get_blob(self, blob):
171171
172172 >>> from gcloud import storage
173173 >>> connection = storage.get_connection(project)
174- >>> bucket = connection .get_bucket('my-bucket')
174+ >>> bucket = storage .get_bucket('my-bucket', connection=connection )
175175 >>> print bucket.get_blob('/path/to/blob.txt')
176176 <Blob: my-bucket, /path/to/blob.txt>
177177 >>> print bucket.get_blob('/does-not-exist.txt')
@@ -302,7 +302,7 @@ def delete(self, force=False):
302302 # Ignore 404 errors on delete.
303303 self .delete_blobs (blobs , on_error = lambda blob : None )
304304
305- self .connection .delete_bucket ( self .name )
305+ self .connection .api_request ( method = 'DELETE' , path = self .path )
306306
307307 def delete_blob (self , blob ):
308308 """Deletes a blob from the current bucket.
@@ -315,7 +315,7 @@ def delete_blob(self, blob):
315315 >>> from gcloud.exceptions import NotFound
316316 >>> from gcloud import storage
317317 >>> connection = storage.get_connection(project)
318- >>> bucket = connection .get_bucket('my-bucket')
318+ >>> bucket = storage .get_bucket('my-bucket', connection=connection )
319319 >>> print bucket.get_all_blobs()
320320 [<Blob: my-bucket, my-file.txt>]
321321 >>> bucket.delete_blob('my-file.txt')
@@ -397,7 +397,7 @@ def upload_file(self, filename, blob=None):
397397
398398 >>> from gcloud import storage
399399 >>> connection = storage.get_connection(project)
400- >>> bucket = connection .get_bucket('my-bucket')
400+ >>> bucket = storage .get_bucket('my-bucket', connection=connection )
401401 >>> bucket.upload_file('~/my-file.txt', 'remote-text-file.txt')
402402 >>> print bucket.get_all_blobs()
403403 [<Blob: my-bucket, remote-text-file.txt>]
@@ -408,7 +408,7 @@ def upload_file(self, filename, blob=None):
408408
409409 >>> from gcloud import storage
410410 >>> connection = storage.get_connection(project)
411- >>> bucket = connection .get_bucket('my-bucket')
411+ >>> bucket = storage .get_bucket('my-bucket', connection=connection )
412412 >>> bucket.upload_file('~/my-file.txt')
413413 >>> print bucket.get_all_blobs()
414414 [<Blob: my-bucket, my-file.txt>]
@@ -440,7 +440,7 @@ def upload_file_object(self, file_obj, blob=None):
440440
441441 >>> from gcloud import storage
442442 >>> connection = storage.get_connection(project)
443- >>> bucket = connection .get_bucket('my-bucket')
443+ >>> bucket = storage .get_bucket('my-bucket', connection=connection )
444444 >>> bucket.upload_file(open('~/my-file.txt'), 'remote-text-file.txt')
445445 >>> print bucket.get_all_blobs()
446446 [<Blob: my-bucket, remote-text-file.txt>]
@@ -451,7 +451,7 @@ def upload_file_object(self, file_obj, blob=None):
451451
452452 >>> from gcloud import storage
453453 >>> connection = storage.get_connection(project)
454- >>> bucket = connection .get_bucket('my-bucket')
454+ >>> bucket = storage .get_bucket('my-bucket', connection=connection )
455455 >>> bucket.upload_file(open('~/my-file.txt'))
456456 >>> print bucket.get_all_blobs()
457457 [<Blob: my-bucket, my-file.txt>]
@@ -706,7 +706,7 @@ def configure_website(self, main_page_suffix=None, not_found_page=None):
706706
707707 >>> from gcloud import storage
708708 >>> connection = storage.get_connection(project)
709- >>> bucket = connection .get_bucket(bucket_name)
709+ >>> bucket = storage .get_bucket(bucket_name, connection=connection )
710710 >>> bucket.configure_website('index.html', '404.html')
711711
712712 You probably should also make the whole bucket public::
0 commit comments