diff --git a/CHANGES.rst b/CHANGES.rst index a509b87..591d870 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -6,7 +6,7 @@ CHANGES - New option ``doctests`` to run Pyflakes checks on doctests too - New option ``jobs`` to launch multiple jobs in parallel -- Fix Git and Mercurial hooks, issues #88 and #133 +- Fix Git and Mercurial hooks, issues #88, #133 and #148 - Fix crashes with Python 3.4 by upgrading dependencies - Fix traceback when running tests with Python 2.6 - Fix the setuptools command ``python setup.py flake8`` to read diff --git a/flake8/hooks.py b/flake8/hooks.py index 48f50b3..f53c8f0 100644 --- a/flake8/hooks.py +++ b/flake8/hooks.py @@ -125,10 +125,10 @@ def run(command, raw_output=False, decode=True): # endswith method. That should work but might still fail horribly. if hasattr(stdout, 'decode'): if decode: - stdout = stdout.decode() + stdout = stdout.decode('utf-8') if hasattr(stderr, 'decode'): if decode: - stderr = stderr.decode() + stderr = stderr.decode('utf-8') if not raw_output: stdout = [line.strip() for line in stdout.splitlines()] stderr = [line.strip() for line in stderr.splitlines()]