Merge lp:~salgado/launchpad/fix-distro-bug-reporting-test into lp:~launchpad-committers/launchpad/python-migration

Proposed by Guilherme Salgado
Status: Merged
Approved by: Barry Warsaw
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~salgado/launchpad/fix-distro-bug-reporting-test
Merge into: lp:~launchpad-committers/launchpad/python-migration
Diff against target: 12 lines
1 file modified
lib/canonical/launchpad/scripts/logger.py (+1/-1)
To merge this branch: bzr merge lp:~salgado/launchpad/fix-distro-bug-reporting-test
Reviewer Review Type Date Requested Status
Barry Warsaw (community) Approve
Review via email: mp+13494@code.launchpad.net

This proposal supersedes a proposal from 2009-10-16.

To post a comment you must log in.
Revision history for this message
Guilherme Salgado (salgado) wrote : Posted in a previous version of this proposal

Fix the LibrarianFormatter to work with the new Exception.__str__

It changed from 2.4 to 2.5.

In 2.4:
(Pdb) p str(ei[0])
'canonical.launchpad.scripts.ftests.test_librarianformatter.Dud'

In 2.5:
(Pdb) p str(ei[0])
"<class 'canonical.launchpad.scripts.ftests.test_librarianformatter.Dud'>"

Revision history for this message
Guilherme Salgado (salgado) wrote :

Fix the LibrarianFormatter to work with 2.5's Exception, simplifying it a bit and possibly making it forwards compatible.

Revision history for this message
Barry Warsaw (barry) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/canonical/launchpad/scripts/logger.py'
2--- lib/canonical/launchpad/scripts/logger.py 2009-08-03 14:43:58 +0000
3+++ lib/canonical/launchpad/scripts/logger.py 2009-10-16 18:10:24 +0000
4@@ -163,7 +163,7 @@
5 except:
6 pass
7 if not exception_string:
8- exception_string = str(ei[0]).split('.')[-1]
9+ exception_string = ei[0].__name__
10
11 expiry = datetime.now().replace(tzinfo=utc) + timedelta(days=90)
12 try:

Subscribers

People subscribed via source and target branches