From c9f86ab5bf759f0f234bfeb58a405f395ccb0aa6 Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Fri, 31 Oct 2014 14:20:03 -0400 Subject: [PATCH] Document exceptions (currently) raised from 'Connection.create_bucket'. Note that #164 would change this (by adding fine-grained exceptions for 409, 401, etc.). Fixes #166 (but should be revisited if #164 lands). --- gcloud/storage/connection.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcloud/storage/connection.py b/gcloud/storage/connection.py index 0d1a736ff357..24455e3c62ae 100644 --- a/gcloud/storage/connection.py +++ b/gcloud/storage/connection.py @@ -338,6 +338,8 @@ def create_bucket(self, bucket): :rtype: :class:`gcloud.storage.bucket.Bucket` :returns: The newly created bucket. + :raises: :class:`gcloud.storage.exceptions.ConnectionError` if + there is a confict (bucket already exists, invalid name, etc.) """ bucket = self.new_bucket(bucket) response = self.api_request(method='POST', path='/b',