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

Unified Diff: breakpad.py

Issue 3384020: Improve breakpad by adding cwd, fix str(last_tb) and dump what is sent to the user. (Closed)
Patch Set: Created 10 years, 3 months 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 0a1fc083dcdd7f3104888f985dee8efd40a119c7..b7d52bb833ee913e75a62c7d38492dcdb463e07a 100644
--- a/breakpad.py
+++ b/breakpad.py
@@ -39,12 +39,14 @@ def SendStack(last_tb, stack, url=None):
'user': getpass.getuser(),
'exception': last_tb,
'host': socket.getfqdn(),
+ 'cwd': os.getcwd(),
}
try:
# That may not always work.
params['exception'] = str(last_tb)
except:
pass
+ print '\n'.join(' %s: %s' % (k, v[0:50]) for k,v in params.iteritems())
request = urllib.urlopen(url, urllib.urlencode(params))
print request.read()
request.close()
@@ -58,7 +60,7 @@ def CheckForException():
if last_value and not isinstance(last_value, KeyboardInterrupt):
last_tb = getattr(sys, 'last_traceback', None)
if last_tb:
- SendStack(repr(last_value), ''.join(traceback.format_tb(last_tb)))
+ SendStack(last_value, ''.join(traceback.format_tb(last_tb)))
def Register():
« 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