Commit 6f6a801e authored by maruel@chromium.org's avatar maruel@chromium.org

Prints errors on http protocol

TEST=none
BUG=none

Review URL: http://codereview.chromium.org/507071

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@35156 0039d316-1c4b-4281-b951-d872f2087c98
parent c308a744
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment