Commit 432fb944 authored by tandrii@chromium.org's avatar tandrii@chromium.org

rietveld: retry more transient errors.

Namely these errors when applying patch:

  <urlopen error [Errno 10060] A connection attempt failed
  because the connected party did not properly respond after
  a period of time, or established connection failed because
  connected host has failed to respond>

  <urlopen error [Errno 104] Connection reset by peer>

R=sergiyb@chromium.org,phajdan.jr@chromium.org
BUG=601260

Review URL: https://codereview.chromium.org/1876093002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299837 0039d316-1c4b-4281-b951-d872f2087c98
parent 5df290f6
...@@ -441,7 +441,11 @@ class Rietveld(object): ...@@ -441,7 +441,11 @@ class Rietveld(object):
for retry_anyway in ( for retry_anyway in (
'Name or service not known', 'Name or service not known',
'EOF occurred in violation of protocol', 'EOF occurred in violation of protocol',
'timed out'): 'timed out',
# See http://crbug.com/601260.
'urlopen error [Errno 10060] A connection attempt failed',
'urlopen error [Errno 104] Connection reset by peer',
):
if retry_anyway in reason_as_str: if retry_anyway in reason_as_str:
return True return True
return False # Assume permanent otherwise. return False # Assume permanent otherwise.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment