mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-12 15:44:17 +00:00
Assume UTF-8 when decoding hg or git output; closes #148
This commit is contained in:
parent
a3ecfbaaf8
commit
1ea9f12b18
2 changed files with 3 additions and 3 deletions
|
|
@ -6,7 +6,7 @@ CHANGES
|
||||||
|
|
||||||
- New option ``doctests`` to run Pyflakes checks on doctests too
|
- New option ``doctests`` to run Pyflakes checks on doctests too
|
||||||
- New option ``jobs`` to launch multiple jobs in parallel
|
- 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 crashes with Python 3.4 by upgrading dependencies
|
||||||
- Fix traceback when running tests with Python 2.6
|
- Fix traceback when running tests with Python 2.6
|
||||||
- Fix the setuptools command ``python setup.py flake8`` to read
|
- Fix the setuptools command ``python setup.py flake8`` to read
|
||||||
|
|
|
||||||
|
|
@ -125,10 +125,10 @@ def run(command, raw_output=False, decode=True):
|
||||||
# endswith method. That should work but might still fail horribly.
|
# endswith method. That should work but might still fail horribly.
|
||||||
if hasattr(stdout, 'decode'):
|
if hasattr(stdout, 'decode'):
|
||||||
if decode:
|
if decode:
|
||||||
stdout = stdout.decode()
|
stdout = stdout.decode('utf-8')
|
||||||
if hasattr(stderr, 'decode'):
|
if hasattr(stderr, 'decode'):
|
||||||
if decode:
|
if decode:
|
||||||
stderr = stderr.decode()
|
stderr = stderr.decode('utf-8')
|
||||||
if not raw_output:
|
if not raw_output:
|
||||||
stdout = [line.strip() for line in stdout.splitlines()]
|
stdout = [line.strip() for line in stdout.splitlines()]
|
||||||
stderr = [line.strip() for line in stderr.splitlines()]
|
stderr = [line.strip() for line in stderr.splitlines()]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue