Browse files

Add __repr__ to GlacierResponse

Since GlacierResponse inherits from dict, it was not obvious at first that the object has other methods and attributes, which makes discovering how to read data back from Glacier non-obvious.
Hopefully this helps users with discoverability.
  • Loading branch information...
1 parent a7171ce commit bda8f4257f3121e865bdf19fd6e84ecb48505146 @schworer committed Sep 12, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 boto/glacier/
5 boto/glacier/
@@ -41,7 +41,10 @@ def __init__(self, http_response, response_headers):
size = http_response.getheader('Content-Length', None)
if size is not None:
self.size = size
+ def __repr__(self):
+ return "<GlacierResponse %s>" % self.get('RequestId')
def read(self, amt=None):
"Reads and returns the response body, or up to the next amt bytes."

0 comments on commit bda8f42

Please sign in to comment.