 Chromium Code Reviews
 Chromium Code Reviews 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/
    
  
    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/| 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) |