Skip to content

Commit

Permalink
Removing TODOs from storage.key.
Browse files Browse the repository at this point in the history
  • Loading branch information
dhermes committed Sep 22, 2014
1 parent 1f2aaf3 commit b5e8322
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions gcloud/storage/key.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ def connection(self):
:returns: The connection to use, or None if no connection is set.
"""

# TODO: If a bucket isn't defined, this is basically useless.
# Where do we throw an error?
if self.bucket and self.bucket.connection:
return self.bucket.connection

Expand Down Expand Up @@ -166,9 +164,6 @@ def get_contents_to_filename(self, filename):
:raises: :class:`gcloud.storage.exceptions.NotFoundError`
"""

# TODO: Add good error checking.
# TODO: Add good exception handling.
# TODO: Set timestamp? Make optional, default being to set it if possible?
with open(filename, 'wb') as fh:
self.get_contents_to_file(fh)

Expand Down Expand Up @@ -239,8 +234,6 @@ def set_contents_from_file(self, fh, rewind=False, size=None,
'Content-Range': 'bytes %d-%d/%d' % (start, end, total_bytes),
}

# TODO: Error checking for response code.
# TODO: Exponential backoff when errors come through.
response, content = self.connection.make_request(content_type='text/plain',
method='POST', url=upload_url, headers=headers, data=data)

Expand Down Expand Up @@ -279,7 +272,6 @@ def set_contents_from_string(self, data, content_type='text/plain'):
:returns: The updated Key object.
"""

# TODO: How do we handle NotFoundErrors?
string_buffer = StringIO()
string_buffer.write(data)
self.set_contents_from_file(fh=string_buffer, rewind=True,
Expand Down Expand Up @@ -385,7 +377,6 @@ def reload_acl(self):
return self

def get_acl(self):
# TODO: This might be a VERY long list. Use the specific API endpoint.
"""Get ACL metadata as a :class:`gcloud.storage.acl.ObjectACL` object.
:rtype: :class:`gcloud.storage.acl.ObjectACL`
Expand Down

0 comments on commit b5e8322

Please sign in to comment.