Commit 1bf69a12 authored by Andrii Shyshkalov's avatar Andrii Shyshkalov Committed by Commit Bot

Fix bug in is_transient check of rietveld rpc errors.

R=katthomas@chromium.org,sergiyb@chromium.org
BUG=chromium:601260

Change-Id: I79e1e807d1f8aed8d294742974d1f42a852c6b13
Reviewed-on: https://chromium-review.googlesource.com/415147
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: 's avatarSergiy Byelozyorov <sergiyb@chromium.org>
parent 935b93fb
......@@ -449,13 +449,15 @@ class Rietveld(object):
'EOF occurred in violation of protocol',
'timed out',
# See http://crbug.com/601260.
'urlopen error [Errno 10060] A connection attempt failed',
'urlopen error [Errno 104] Connection reset by peer',
'[Errno 10060] A connection attempt failed',
'[Errno 104] Connection reset by peer',
):
if retry_anyway in reason_as_str:
return True
return False # Assume permanent otherwise.
if not is_transient():
logging.error('Caught urllib2.URLError %s which wasn\'t deemed '
'transient', e.reason)
raise
except socket.error, e:
if retry >= (self._maxtries - 1):
......
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