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

Unified Diff: trychange.py

Issue 278203002: gerrit_util is aware of auth errors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: moved auth check into the retry loop Created 6 years, 7 months 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 | « gerrit_util.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trychange.py
diff --git a/trychange.py b/trychange.py
index fc9c1eb1f2fd27283c2bcd0fa6572ee781281f72..7ad2fa126940fc90e15e61583b338c5de7b344ec 100755
--- a/trychange.py
+++ b/trychange.py
@@ -779,8 +779,12 @@ def _SendChangeGerrit(bot_spec, options):
change_id = GetChangeId(head_sha)
- # Check that the uploaded revision matches the local one.
- changes = gerrit_util.GetChangeCurrentRevision(gerrit_host, change_id)
+ try:
+ # Check that the uploaded revision matches the local one.
+ changes = gerrit_util.GetChangeCurrentRevision(gerrit_host, change_id)
+ except gerrit_util.GerritAuthenticationError, e:
+ raise NoTryServerAccess(e.message)
+
assert len(changes) <= 1, 'Multiple changes with id %s' % change_id
if not changes:
raise Error('A change %s was not found on the server. Was it uploaded?' %
« no previous file with comments | « gerrit_util.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698