s3tools/s3cmd — pull request #331 by orenhe (2014-05-10 12:07:22+00:00)
Title: Tolerate non-XML errors, e.g. proxy-generated 403/502 HTML errors

Code used to raise an unhandled exception if the resulting error is not an XML
(ElementTree ParseError when creating S3Error object). In certain cases (e.g.
5xx errors), this also disrupted the retry flow.

Easily reproducible when running a simple 's3cmd ls' while s3cfg has an http
proxy set up, and the proxy denies all requests - returns a non-XML 403 error.

* Also extracted a method for the XML Error parsing to clean the code a little.