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

Unified Diff: commit-queue/pending_manager.py

Issue 83173008: CQ: don't treat the commit box as unchecked on network errors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/
Patch Set: Created 7 years, 1 month 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: commit-queue/pending_manager.py
===================================================================
--- commit-queue/pending_manager.py (revision 236787)
+++ commit-queue/pending_manager.py (working copy)
@@ -175,8 +175,17 @@
Calls _new_pending_commit() on all new review found.
"""
- new_issues = self._fetch_pending_issues()
+ try:
+ new_issues = self.context.rietveld.get_pending_issues()
+ except urllib2.URLError as e:
+ if 'timed out' in e.reason:
+ # Handle timeouts gracefully. Log them and pretend there are no
+ # pending issues. We'll retry on the next iteration.
+ logging.warn('request to fetch pending issues timed out: %s' % e)
+ return
+ raise
+
# If there is an issue in processed_issues that is not in new_issues,
# discard it.
for pending in self.queue.iterate():
@@ -243,21 +252,6 @@
description=issue_data['description'].replace('\r', ''),
messages=issue_data['messages']))
- def _fetch_pending_issues(self):
- """Returns the list of issue number for reviews on Rietveld with their last
- patchset with commit+ flag set.
- """
- try:
- return self.context.rietveld.get_pending_issues()
- except urllib2.URLError as e:
- if 'timed out' in e.reason:
- # Handle timeouts gracefully. Log them and pretend there are no
- # pending issues. We'll retry on the next iteration.
- logging.warn('request to fetch pending issues timed out: %s' % e)
- return []
-
- raise
-
def process_new_pending_commit(self):
"""Starts verification on newly found pending commits."""
expected = set(i.name for i in self.all_verifiers)
« 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