Browse files

Merge pull request #32 from kellymclaughlin/check-for-empty-error-res…

…ponse-body

Handle empty return bodies when processing S3 errors.
  • Loading branch information...
2 parents 23d133a + a845140 commit 0151fa4f7fb1bc941884cf3121444af40a5fbde0 @mludvig mludvig committed Feb 29, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 S3/Exceptions.py
View
2 S3/Exceptions.py
@@ -44,7 +44,7 @@ def __init__(self, response):
if response.has_key("headers"):
for header in response["headers"]:
debug("HttpHeader: %s: %s" % (header, response["headers"][header]))
- if response.has_key("data"):
+ if response.has_key("data") and response["data"]:
tree = getTreeFromXml(response["data"])
error_node = tree
if not error_node.tag == "Error":

0 comments on commit 0151fa4

Please sign in to comment.