Merge lp:~tcole/wsgi-oops/fix-oops-dump-error-reporting into lp:wsgi-oops

Proposed by Tim Cole
Status: Merged
Approved by: Tim Cole
Approved revision: 55
Merged at revision: 56
Proposed branch: lp:~tcole/wsgi-oops/fix-oops-dump-error-reporting
Merge into: lp:wsgi-oops
Diff against target: 20 lines (+5/-5)
1 file modified
canonical/oops/wsgi.py (+5/-5)
To merge this branch: bzr merge lp:~tcole/wsgi-oops/fix-oops-dump-error-reporting
Reviewer Review Type Date Requested Status
Stuart Colville (community) Approve
Review via email: mp+52144@code.launchpad.net

Commit message

Fix issue where all app errors are reported as oops dump errors.

Description of the change

Right now wsgi-oops always reports an error dumping oopses, even when no such error occurred (in which case, the error reported will actually be the error that triggered the oops in the first place). This fixes that.

To post a comment you must log in.
Revision history for this message
Stuart Colville (muffinresearch) wrote :

Looks good

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'canonical/oops/wsgi.py'
2--- canonical/oops/wsgi.py 2011-01-18 09:50:00 +0000
3+++ canonical/oops/wsgi.py 2011-03-03 22:59:10 +0000
4@@ -166,11 +166,11 @@
5 self.serial.dump(oops)
6 except:
7 exc_info = sys.exc_info()
8- try:
9- message = "Error when dumping OOPS %s" % oops.id
10- root_logger.error(message, exc_info=exc_info)
11- finally:
12- exc_info = None
13+ try:
14+ message = "Error when dumping OOPS %s" % oops.id
15+ root_logger.error(message, exc_info=exc_info)
16+ finally:
17+ exc_info = None
18
19 try:
20 body = self.app(environ, trap_response)

Subscribers

People subscribed via source and target branches