Skip to content

Commit

Permalink
Merge branch 'master' into py3-support
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsuhiko committed Sep 23, 2010
2 parents 252021c + e41a45c commit 8f78a05
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion logbook/more.py
Expand Up @@ -344,7 +344,7 @@ def format_and_encode(self, record):
if self.should_colorize(record):
color = self.get_color(record)
if color:
rv = colorize(color, rv.rstrip('\n')) + '\n'
rv = colorize(color, rv)
return rv


Expand Down
7 changes: 4 additions & 3 deletions logbook/testsuite/__init__.py
Expand Up @@ -914,9 +914,10 @@ def should_colorize(self, record):
self.log.debug('A debug message')
lines = handler.stream.getvalue().rstrip('\n').splitlines()
self.assertEqual(lines, [
'\x1b[31;01mAn error\x1b[39;49;00m',
'\x1b[33;01mA warning\x1b[39;49;00m',
'\x1b[37mA debug message\x1b[39;49;00m'
'\x1b[31;01mAn error',
'\x1b[39;49;00m\x1b[33;01mA warning',
'\x1b[39;49;00m\x1b[37mA debug message',
'\x1b[39;49;00m'
])


Expand Down

0 comments on commit 8f78a05

Please sign in to comment.