Merge lp:~elachuni/wsgi-oops/python2.7 into lp:wsgi-oops

Proposed by Anthony Lenton
Status: Merged
Approved by: Natalia Bidart
Approved revision: 57
Merged at revision: 57
Proposed branch: lp:~elachuni/wsgi-oops/python2.7
Merge into: lp:wsgi-oops
Diff against target: 12 lines (+1/-1)
1 file modified
canonical/oops/oops.py (+1/-1)
To merge this branch: bzr merge lp:~elachuni/wsgi-oops/python2.7
Reviewer Review Type Date Requested Status
Natalia Bidart (community) Approve
Martin Albisetti (community) Approve
Review via email: mp+58527@code.launchpad.net

Description of the change

This branch makes wsgi-oops compatible with Python2.7.

Python 2.7's logging module doesn't allow you to pass in None as a logging level when initializing a Handler. You can pass in logging.NOTSET though, that serves the same purpose and also works in 2.6.

To post a comment you must log in.
Revision history for this message
Martin Albisetti (beuno) wrote :

Just ran into this myself for U1, and this fixes it :)

review: Approve
Revision history for this message
Natalia Bidart (nataliabidart) wrote :

/me too

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'canonical/oops/oops.py'
2--- canonical/oops/oops.py 2010-02-16 16:27:45 +0000
3+++ canonical/oops/oops.py 2011-04-20 16:22:43 +0000
4@@ -230,7 +230,7 @@
5 class OOPSLoggingHandler(logging.Handler):
6 """Logging handler that forwards logged records to all existent OOPSLogs.
7 """
8- def __init__(self, level=None, serializer=None, oops=None):
9+ def __init__(self, level=logging.NOTSET, serializer=None, oops=None):
10 """bind the serializer and the oops to the handler instance"""
11 logging.Handler.__init__(self, level)
12 self.serializer = serializer

Subscribers

People subscribed via source and target branches