| 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,40 @@
|
| # 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('%s while accessing %s. Ignoring error.' % (
|
| + str(e), e.url))
|
| + continue
|
| + raise
|
| + except urllib2.URLError as e:
|
| + # Temporary AppEngine hiccup. Just log it and continue.
|
| + if 'timed out' in e.reason:
|
| + logging.warning(
|
| + '%s while accessing rietveld issue %s. Ignoring error.' % (
|
| + str(e), str(issue_id)))
|
| + continue
|
| + raise
|
| + except socket.error as e:
|
| + # Temporary AppEngine hiccup. Just log it and continue.
|
| + if e.errno == errno.ECONNRESET:
|
| + logging.warning(
|
| + '%s while accessing rietveld issue %s. Ignoring error.' % (
|
| + str(e), str(issue_id)))
|
| + continue
|
| + raise
|
| + except IOError as e:
|
| + # Temporary AppEngine hiccup. Just log it and continue.
|
| + if e.errno == 'socket error':
|
| + logging.warning(
|
| + '%s while accessing rietveld issue %s. Ignoring error.' % (
|
| + str(e), str(issue_id)))
|
| + continue
|
| + raise
|
| # This assumption needs to hold.
|
| assert issue_id == issue_data['issue']
|
| if issue_data['patchsets'] and issue_data['commit']:
|
|
|