Merge lp:~jelmer/wikkid/logging-streamhandler-keywordname into lp:wikkid

Proposed by Jelmer Vernooij
Status: Merged
Merged at revision: 58
Proposed branch: lp:~jelmer/wikkid/logging-streamhandler-keywordname
Merge into: lp:wikkid
Diff against target: 12 lines (+1/-1)
1 file modified
bin/wikkid-serve (+1/-1)
To merge this branch: bzr merge lp:~jelmer/wikkid/logging-streamhandler-keywordname
Reviewer Review Type Date Requested Status
Tim Penhey Approve
Review via email: mp+52765@code.launchpad.net

Description of the change

logging.StreamHandler() seems to take a "stream" rather than a "strm" argument in newer versions of Python.

This MP changes wikkid to avoid using a keyword argument to work around this issue.

To post a comment you must log in.
Revision history for this message
Tim Penhey (thumper) :
review: Approve
Revision history for this message
Tim Penhey (thumper) wrote :

I'll merge it now. That code was copied from elsewhere without much thought.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bin/wikkid-serve'
--- bin/wikkid-serve 2010-11-22 09:33:07 +0000
+++ bin/wikkid-serve 2011-03-09 21:38:45 +0000
@@ -34,7 +34,7 @@
3434
35def setup_logging():35def setup_logging():
36 """Set up a logger sending to stderr."""36 """Set up a logger sending to stderr."""
37 handler = logging.StreamHandler(strm=sys.stderr)37 handler = logging.StreamHandler(sys.stderr)
38 fmt = '%(asctime)s %(levelname)-7s %(message)s'38 fmt = '%(asctime)s %(levelname)-7s %(message)s'
39 formatter = logging.Formatter(39 formatter = logging.Formatter(
40 fmt=fmt, datefmt="%Y-%m-%d %H:%M:%S")40 fmt=fmt, datefmt="%Y-%m-%d %H:%M:%S")

Subscribers

People subscribed via source and target branches