Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(182)

Unified Diff: third_party/upload.py

Issue 6304006: Second attempt to work around App Engine flakiness by retrying upon URLError... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: '' Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/upload.py
===================================================================
--- third_party/upload.py (revision 71694)
+++ third_party/upload.py (working copy)
@@ -416,6 +416,14 @@
url = e.info()["location"]
else:
raise
+ except urllib2.URLError, e:
+ reason = getattr(e, 'reason', None)
+ if isinstance(reason, str) and reason.find("110") != -1:
+ # Connection timeout error.
+ if tries <= 3:
+ # Try again.
+ continue
+ raise
finally:
socket.setdefaulttimeout(old_timeout)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698