Commit 3487f7f4 authored by thakis@chromium.org's avatar thakis@chromium.org

Add more logging. Useful to understand `git try` slowness.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@71602 0039d316-1c4b-4281-b951-d872f2087c98
parent e0c16f9f
......@@ -87,6 +87,7 @@ def CheckCall(command, print_error=True, **kwargs):
Works on python 2.4
"""
logging.info("CheckCall(%s)" % command)
try:
stderr = None
if not print_error:
......@@ -98,6 +99,7 @@ def CheckCall(command, print_error=True, **kwargs):
if process.returncode:
raise CheckCallError(command, kwargs.get('cwd', None), process.returncode,
std_out, std_err)
logging.info("CheckCall done")
return std_out, std_err
......
......@@ -336,7 +336,9 @@ def _SendChangeHTTP(options):
logging.info(options.diff)
try:
logging.info('Opening connection...')
connection = urllib.urlopen(url, urllib.urlencode(values), proxies=proxies)
logging.info('Done')
except IOError, e:
logging.info(str(e))
if (values.get('bot') and len(e.args) > 2 and
......@@ -347,7 +349,9 @@ def _SendChangeHTTP(options):
str(e.args)))
if not connection:
raise NoTryServerAccess('%s is unaccessible.' % url)
logging.info('Reading response...')
response = connection.read()
logging.info('Done')
if response != 'OK':
raise NoTryServerAccess('%s is unaccessible. Got:\n%s' % (url, response))
......
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