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

Unified Diff: breakpad.py

Issue 5608001: Make max len parametrable so it can be modified for users. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 10 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: breakpad.py
diff --git a/breakpad.py b/breakpad.py
index a4539cbb72130a1129985e2cff7c771f21b2f9aa..d5b4d926a0af6da64febd81d905fe126e04a2618 100644
--- a/breakpad.py
+++ b/breakpad.py
@@ -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()
« 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