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

Unified Diff: pending_manager.py

Issue 102703004: Improved user-facing messages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/commit-queue
Patch Set: Created 7 years 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
Index: pending_manager.py
diff --git a/pending_manager.py b/pending_manager.py
index 7548be2e2490eae993d80d98a51ed6c49a320d50..2ccdab67836892d3cc6ab7e7bd14b416c8f663af 100644
--- a/pending_manager.py
+++ b/pending_manager.py
@@ -23,10 +23,10 @@ import traceback
import urllib2
import find_depot_tools # pylint: disable=W0611
-import checkout
-import git_cl
-import patch
-import subprocess2
+import checkout # pylint: disable=F0401
+import git_cl # pylint: disable=F0401
+import patch # pylint: disable=F0401
+import subprocess2 # pylint: disable=F0401
import errors
import model
@@ -148,14 +148,18 @@ class PendingManager(object):
# Delay (secs) between commit bursts.
COMMIT_BURST_DELAY = 10*60
- def __init__(self, context_obj, pre_patch_verifiers, verifiers):
+ def __init__(self, context_obj, pre_patch_verifiers, verifiers,
+ project_name=''):
"""
Args:
pre_patch_verifiers: Verifiers objects that are run before applying the
patch.
verifiers: Verifiers object run after applying the patch.
"""
- assert len(pre_patch_verifiers) or len(verifiers)
+ if not(len(pre_patch_verifiers) or len(verifiers)):
+ raise ValueError('at least one verifier should be defined (in project %s)'
+ % project_name)
+
self.context = context_obj
self.pre_patch_verifiers = pre_patch_verifiers or []
self.verifiers = verifiers or []
@@ -429,6 +433,7 @@ class PendingManager(object):
'Failed to set the flag to False for %s with message %s' % (
pending.pending_name(), message))
traceback.print_stack()
+ logging.error(str(e))
errors.send_stack(e)
if message:
try:
« no previous file with comments | « async_push.py ('k') | tests/pending_manager_test.py » ('j') | tests/pending_manager_test.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698