Commit f31294b4 authored by maruel@chromium.org's avatar maruel@chromium.org

Make max len parametrable so it can be modified for users.

Mostly useful for commit-queue as I want to both send the trace and be able to
read it locally.

TBR=jam

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@68055 0039d316-1c4b-4281-b951-d872f2087c98
parent b7d3b24d
......@@ -55,7 +55,7 @@ def FormatException(e):
return out
def SendStack(last_tb, stack, url=None):
def SendStack(last_tb, stack, url=None, maxlen=50):
"""Sends the stack trace to the breakpad server."""
if not url:
url = DEFAULT_URL
......@@ -71,7 +71,8 @@ def SendStack(last_tb, stack, url=None):
'version': sys.version,
}
# pylint: disable=W0702
print('\n'.join(' %s: %s' % (k, v[0:50]) for k, v in params.iteritems()))
print('\n'.join(' %s: %s' % (k, v[0:maxlen])
for k, v in params.iteritems()))
request = urllib.urlopen(url, urllib.urlencode(params))
print(request.read())
request.close()
......
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