summaryrefslogtreecommitdiffstats
path: root/gitlint/display.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-01-25 13:26:11 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-01-25 13:26:35 +0000
commit4fee3e091a8d79a40f70ff9c1f87b29b9340049a (patch)
tree465ad9629a8ee56548bd6c51c3fc710907564911 /gitlint/display.py
parentReleasing debian version 0.14.0-1. (diff)
downloadgitlint-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.py13
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):