diff options
author | Emile Anclin <emile.anclin@logilab.fr> | 2010-11-09 17:03:44 +0100 |
---|---|---|
committer | Emile Anclin <emile.anclin@logilab.fr> | 2010-11-09 17:03:44 +0100 |
commit | e92032fb31485a9bbf09ca42130547c5d69ba72b (patch) | |
tree | 6ccda72f11d069684dffcea929067ff485ebe982 /reporters/__init__.py | |
parent | c38a144e2215c7b069ad25381243b83aa0c6ad19 (diff) | |
download | pylint-e92032fb31485a9bbf09ca42130547c5d69ba72b.tar.gz |
py3k : fix reporter output (don't print bytes but strings)
Diffstat (limited to 'reporters/__init__.py')
-rw-r--r-- | reporters/__init__.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/reporters/__init__.py b/reporters/__init__.py index 1380f11..0582a6f 100644 --- a/reporters/__init__.py +++ b/reporters/__init__.py @@ -48,6 +48,11 @@ class BaseReporter: def set_output(self, output=None): """set output stream""" self.out = output or sys.stdout + # py3k streams handle their encoding : + if sys.version_info >= (3, 0): + self.encode = lambda x: x + return + def encode(string): if not isinstance(string, unicode): return string |