diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-01-25 13:26:11 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-01-25 13:26:35 +0000 |
commit | 4fee3e091a8d79a40f70ff9c1f87b29b9340049a (patch) | |
tree | 465ad9629a8ee56548bd6c51c3fc710907564911 /gitlint/display.py | |
parent | Releasing debian version 0.14.0-1. (diff) | |
download | gitlint-4fee3e091a8d79a40f70ff9c1f87b29b9340049a.tar.xz gitlint-4fee3e091a8d79a40f70ff9c1f87b29b9340049a.zip |
Merging upstream version 0.15.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'gitlint/display.py')
-rw-r--r-- | gitlint/display.py | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/gitlint/display.py b/gitlint/display.py index c66a256..c9bcb01 100644 --- a/gitlint/display.py +++ b/gitlint/display.py @@ -1,18 +1,7 @@ -import codecs -import locale from sys import stdout, stderr -from gitlint.utils import IS_PY2 -# For some reason, python 2.x sometimes messes up with printing unicode chars to stdout/stderr -# This is mostly when there is a mismatch between the terminal encoding and the python encoding. -# This use-case is primarily triggered when piping input between commands, in particular our integration tests -# tend to trip over this. -if IS_PY2: - stdout = codecs.getwriter(locale.getpreferredencoding())(stdout) # pylint: disable=invalid-name - stderr = codecs.getwriter(locale.getpreferredencoding())(stderr) # pylint: disable=invalid-name - -class Display(object): +class Display: """ Utility class to print stuff to an output stream (stdout by default) based on the config's verbosity """ def __init__(self, lint_config): |