Permalink
Browse files

Modify Logger.log so that it can output UTF-8 encoded messages.

  • Loading branch information...
1 parent 412daad commit b154c827e7b26ce33d7a0bb4c317bef2326e2ab2 @msabramo msabramo committed Oct 26, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 pip/log.py
View
@@ -71,7 +71,8 @@ def log(self, level, msg, *args, **kw):
## FIXME: should this be a name, not a level number?
rendered = '%02i %s' % (level, rendered)
if hasattr(consumer, 'write'):
- consumer.write(rendered+'\n')
+ rendered += '\n'
+ consumer.buffer.write(rendered.encode('UTF-8'))
else:
consumer(rendered)

0 comments on commit b154c82

Please sign in to comment.