Merge lp:~allenap/launchpad/use-zope-tb-formatter into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Gavin Panella |
Approved revision: | no longer in the source branch. |
Merged at revision: | 12351 |
Proposed branch: | lp:~allenap/launchpad/use-zope-tb-formatter |
Merge into: | lp:launchpad |
Diff against target: |
252 lines (+94/-21) 4 files modified
lib/canonical/launchpad/scripts/logger.py (+15/-9) lib/canonical/launchpad/scripts/tests/test_logger.py (+44/-2) lib/lp/services/tests/test_utils.py (+23/-10) lib/lp/services/utils.py (+12/-0) |
To merge this branch: | bzr merge lp:~allenap/launchpad/use-zope-tb-formatter |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jeroen T. Vermeulen (community) | Approve | ||
Review via email: mp+48843@code.launchpad.net |
Commit message
[r=jtv][bug=715659] Use zope.exceptions to format logged exceptions so that __traceback_info__ is reported.
Description of the change
This branch does two things:
- Adds a new function, traceback_info(), that injects a
__traceback_
its docstring:
This is more aesthetically pleasing that assigning to
__traceback
lint warnings about unused local variables, and helps to
avoid typos.
- Uses zope.exceptions to format logged exceptions, which means that
the traceback info will be included.
The OOPS tools already use zope.exceptions to format exceptions so
this extra info should show up in OOPS reports soon.
Awesome. I had to struggle to come up with a nit to pick.
What I came up with was pitiful:
213 + # The local variable __traceback_info__ is set by `traceback_info`.
Text may be improved if the passive voice is avoided.
Jeroen