Chromium Code Reviews| Index: commit-queue/pending_manager.py |
| =================================================================== |
| --- commit-queue/pending_manager.py (revision 235481) |
| +++ commit-queue/pending_manager.py (working copy) |
| @@ -13,8 +13,11 @@ |
| - SVN will check the committer write access. |
| """ |
| +import errno |
| import logging |
| import os |
| +import socket |
| +import ssl |
| import time |
| import traceback |
| import urllib2 |
| @@ -23,7 +26,6 @@ |
| import checkout |
| import git_cl |
| import patch |
| -import ssl |
| import subprocess2 |
| import errors |
| @@ -193,8 +195,33 @@ |
| # Find new issues. |
| for issue_id in new_issues: |
| if str(issue_id) not in self.queue.pending_commits: |
| - issue_data = self.context.rietveld.get_issue_properties( |
| - issue_id, True) |
| + try: |
| + issue_data = self.context.rietveld.get_issue_properties( |
| + issue_id, True) |
| + except urllib2.HTTPError as e: |
| + if e.code in (500, 502, 503): |
| + # Temporary AppEngine hiccup. Just log it and continue. |
| + logging.warning(str(e)) |
|
Ryan Tseng
2013/11/16 01:38:37
logging.warning('%s while accessing %s. Ignoring
|
| + continue |
| + raise |
|
Ryan Tseng
2013/11/16 01:38:37
"raise e" so we can propagate this downstream.
Al
|
| + except urllib2.URLError as e: |
| + # Temporary AppEngine hiccup. Just log it and continue. |
| + if 'timed out' in e.reason: |
| + logging.warning(str(e)) |
|
Ryan Tseng
2013/11/16 01:38:37
Make this more verbose.
'%s while accessing rietve
|
| + continue |
| + raise |
| + except socket.error as e: |
| + # Temporary AppEngine hiccup. Just log it and continue. |
| + if e.errno == errno.ECONNRESET: |
| + logging.warning(str(e)) |
| + continue |
| + raise |
| + except IOError as e: |
| + # Temporary AppEngine hiccup. Just log it and continue. |
| + if e.errno == 'socket error': |
| + logging.warning(str(e)) |
| + continue |
| + raise |
| # This assumption needs to hold. |
| assert issue_id == issue_data['issue'] |
| if issue_data['patchsets'] and issue_data['commit']: |