Merge lp:~wgrant/launchpad/fix-mocklogger-format-string-crash into lp:launchpad
Proposed by
William Grant
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp:~wgrant/launchpad/fix-mocklogger-format-string-crash |
Merge into: | lp:launchpad |
Diff against target: | None lines |
To merge this branch: | bzr merge lp:~wgrant/launchpad/fix-mocklogger-format-string-crash |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jonathan Lange (community) | Approve | ||
Review via email: mp+10902@code.launchpad.net |
Commit message
[r=jml][ui=none] (wgrant) Fix bug in MockLogger where format strings without args would raise errors. Also add unit tests for MockLogger.
To post a comment you must log in.
= Summary =
MockLogger.log crashes when there are unfilled format string tokens in the message, even if there are no arguments. This is rather bad when an exception handler passes in exc_info=True, and the traceback happens to contain a '%s'.
== Tests ==
Nothing fails due to this bug with Python 2.4, but soyuz-set- of-uploads. txt does with 2.5 (2.4 seems to render the first line of each statement in tracebacks, while 2.5 renders the last).
$ bin/test -t soyuz-set- of-uploads. txt
I will of course add further tests if requested, but I'm not sure there's much point.