MCPcopy Create free account
hub / github.com/s3tools/s3cmd / parse_error_xml

Method parse_error_xml

S3/Exceptions.py:129–141  ·  view source on GitHub ↗
(tree)

Source from the content-addressed store, hash-verified

127
128 @staticmethod
129 def parse_error_xml(tree):
130 info = {}
131 error_node = tree
132 if not error_node.tag == "Error":
133 error_node = tree.find(".//Error")
134 if error_node is not None:
135 for child in error_node:
136 if child.text != "":
137 debug("ErrorXML: " + child.tag + ": " + repr(child.text))
138 info[child.tag] = child.text
139 else:
140 raise S3ResponseError("Malformed error XML returned from remote server.")
141 return info
142
143
144class CloudFrontError(S3Error):

Callers 1

__init__Method · 0.95

Calls 1

S3ResponseErrorClass · 0.85

Tested by

no test coverage detected