From c15d2a0aa7ba422872a9747418ae7e63f146420b Mon Sep 17 00:00:00 2001 From: "tandrii@chromium.org" Date: Fri, 2 Oct 2015 19:41:39 +0000 Subject: [PATCH] Rietveld: retry on win on "Errno 10060" socket error. R=sergeyberezin@chromium.org BUG=537417 Review URL: https://codereview.chromium.org/1388463002 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296995 0039d316-1c4b-4281-b951-d872f2087c98 --- rietveld.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/rietveld.py b/rietveld.py index 1c569fc9bb..bf06f31508 100644 --- a/rietveld.py +++ b/rietveld.py @@ -15,10 +15,13 @@ The following hypothesis are made: """ import copy +import errno import json import logging import re +import socket import ssl +import sys import time import urllib import urllib2 @@ -429,7 +432,14 @@ class Rietveld(object): if retry >= (self._maxtries - 1): raise if (not 'Name or service not known' in e.reason and - not 'EOF occurred in violation of protocol' in e.reason): + not 'EOF occurred in violation of protocol' in e.reason and + # On windows we hit weird bug http://crbug.com/537417 + # with message '[Errno 10060] A connection attempt failed...' + not (sys.platform.startswith('win') and + isinstance(e.reason, socket.error) and + e.reason.errno == errno.ETIMEDOUT + ) + ): # Usually internal GAE flakiness. raise except ssl.SSLError, e: