Commit 02a89f56 authored by kbr@chromium.org's avatar kbr@chromium.org

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
parent df947ea8
......@@ -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
......
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