diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-01-25 13:26:08 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-01-25 13:26:08 +0000 |
commit | 3313b4f9c3c5d6a579588e77068ca3ae3edffe2b (patch) | |
tree | 81fccb2a4db79b0de9b0d64701581add3a9a1d21 /gitlint/display.py | |
parent | Adding upstream version 0.14.0. (diff) | |
download | gitlint-3313b4f9c3c5d6a579588e77068ca3ae3edffe2b.tar.xz gitlint-3313b4f9c3c5d6a579588e77068ca3ae3edffe2b.zip |
Adding upstream version 0.15.0.upstream/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): |