Skip to content

Commit

Permalink
key.get_file now properly checks the HTTP status code rather than sil…
Browse files Browse the repository at this point in the history
…ently ignore it. Fixes Issue-21
  • Loading branch information
Mitch.Garnaat authored and Mitch.Garnaat committed Jan 13, 2007
1 parent 8410c36 commit 3e99c22
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions boto/s3/key.py
Expand Up @@ -144,6 +144,8 @@ def get_file(self, fp, headers={}):
http_conn.putheader(key,final_headers[key])
http_conn.endheaders()
resp = http_conn.getresponse()
if resp.status != 200:
raise S3ResponseError(resp.status, resp.reason)
response_headers = resp.msg
self.metadata = boto.utils.get_aws_metadata(response_headers)
for key in response_headers.keys():
Expand Down

0 comments on commit 3e99c22

Please sign in to comment.