Bug 1364650 - retry on ChunkedEncodingError; r?gps
As done with ConnectionError in
Bug 1364695, we should also retry on
ChunkedEncodingError.
This should also fix
Bug 1371140.
MozReview-Commit-ID: 5pocA7qJNCM
--- a/python/mozbuild/mozbuild/mach_commands.py
+++ b/python/mozbuild/mozbuild/mach_commands.py
@@ -1832,16 +1832,17 @@ class PackageFrontend(MachCommandBase):
'Downloading {name}')
valid = False
# sleeptime is 60 per retry.py, used by tooltool_wrapper.sh
for attempt, _ in enumerate(redo.retrier(attempts=retry+1,
sleeptime=60)):
try:
record.fetch_with(cache)
except (requests.exceptions.HTTPError,
+ requests.exceptions.ChunkedEncodingError,
requests.exceptions.ConnectionError) as e:
if isinstance(e, requests.exceptions.ConnectionError):
should_retry = True
else:
# The relengapi proxy likes to return error 400 bad request
# which seems improbably to be due to our (simple) GET
# being borked.