Work around App Engine flakiness by retrying upon URLError

("Connection timed out"). This allowed me to successfully upload a CL
I have been stuck on for a couple of hours.

BUG=none
TEST=none

Review URL: http://codereview.chromium.org/6345001

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@71513 0039d316-1c4b-4281-b951-d872f2087c98
experimental/szager/collated-output
kbr@chromium.org 15 years ago
parent df947ea846
commit 02a89f564b

@ -402,6 +402,14 @@ class AbstractRpcServer(object):
response = f.read()
f.close()
return response
except urllib2.URLError, e:
reason = e.reason
if isinstance(reason, str) and reason.find("110") != -1:
# Connection timeout error.
if tries <= 3:
# Try again.
continue
raise
except urllib2.HTTPError, e:
if tries > 3:
raise

Loading…
Cancel
Save