This is happening again, the following (clearly a hack) patch seems to
keep it working... though I suspect it doesn't work with other S3
implementations. (Also, there are other searches for the Code tag...
maybe they could break too).
--- s3c.py.ORIG 2019-12-07 15:07:17.405625340 -0500
+++ s3c.py 2019-12-07 15:14:49.015102089 -0500
@@ -143,7 +143,8 @@
if isinstance(exc, (InternalError, BadDigestError, IncompleteBodyError,
RequestTimeoutError, OperationAbortedError,
- SlowDownError, ServiceUnavailableError)):
+ SlowDownError, ServiceUnavailableError,
+ TemporarilyUnavailableError)):
return True
elif is_temp_network_error(exc):
@@ -559,7 +560,7 @@
self._dump_response(resp, body))
raise
- raise get_S3Error(tree.findtext('Code'), tree.findtext('Message'), resp.headers)
+ raise get_S3Error(tree.findtext('.//{
https://iam.amazonaws.com/doc/2010-05-08/}Code'), tree.findtext('.//{
https://iam.amazonaws.com/doc/2010-05-08/}Message'), resp.headers)
def _parse_xml_response(self, resp, body=None):
'''Return element tree for XML response'''
@@ -1031,5 +1032,6 @@
class RequestTimeoutError(S3Error): pass
class SlowDownError(S3Error): pass
class ServiceUnavailableError(S3Error): pass
+class TemporarilyUnavailableError(S3Error): pass
class RequestTimeTooSkewedError(S3Error): pass
class NoSuchBucketError(S3Error, DanglingStorageURLError): pass