@@ -217,14 +217,12 @@ def api_request(self, method, path=None, query_params=None,
217217 response , content = self .make_request (
218218 method = method , url = url , data = data , content_type = content_type )
219219
220- # TODO: Add better error handling.
221220 if response .status == 404 :
222221 raise exceptions .NotFoundError (response , content )
223222 elif not 200 <= response .status < 300 :
224223 raise exceptions .ConnectionError (response , content )
225224
226225 if content and expect_json :
227- # TODO: Better checking on this header for JSON.
228226 content_type = response .get ('content-type' , '' )
229227 if not content_type .startswith ('application/json' ):
230228 raise TypeError ('Expected JSON, got %s' % content_type )
@@ -282,8 +280,6 @@ def get_bucket(self, bucket_name, *args, **kwargs):
282280 :returns: The bucket matching the name provided.
283281 :raises: :class:`gcloud.storage.exceptions.NotFoundError`
284282 """
285-
286- # TODO: URL-encode the bucket name to be safe?
287283 bucket = self .new_bucket (bucket_name )
288284 response = self .api_request (method = 'GET' , path = bucket .path )
289285 return Bucket .from_dict (response , connection = self )
@@ -317,7 +313,6 @@ def lookup(self, bucket_name):
317313 return None
318314
319315 def create_bucket (self , bucket , * args , ** kwargs ):
320- # TODO: Which exceptions will this raise?
321316 """Create a new bucket.
322317
323318 For example::
0 commit comments