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

Unified Diff: trychange.py

Issue 507071: Prints errors on http protocol (Closed)
Patch Set: Created 11 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
« 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: trychange.py
diff --git a/trychange.py b/trychange.py
index cf328eca2d89f6fcaf5b1d7e80eaea9da58944b8..6f57802ff1f29d61f68d15e7bd52ee3c48bacd4b 100755
--- a/trychange.py
+++ b/trychange.py
@@ -222,8 +222,9 @@ def _SendChangeHTTP(options):
str(e.args)))
if not connection:
raise NoTryServerAccess('%s is unaccessible.' % url)
- if connection.read() != 'OK':
- raise NoTryServerAccess('%s is unaccessible.' % url)
+ response = connection.read()
+ if response != 'OK':
+ raise NoTryServerAccess('%s is unaccessible. Got:\n%s' % (url, response))
def _SendChangeSVN(options):
@@ -493,8 +494,10 @@ def TryChange(argv,
# Send the patch.
options.send_patch(options)
if not options.dry_run:
- print 'Patch \'%s\' sent to try server: %s' % (options.name,
- ', '.join(options.bot))
+ text = 'Patch \'%s\' sent to try server' % options.name
+ if options.bot:
+ text += ': %s' % ', '.join(options.bot)
+ print(text)
except (InvalidScript, NoTryServerAccess), e:
if swallow_exception:
return 1
« 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