summaryrefslogtreecommitdiffstats
path: root/gitlint/display.py
diff options
context:
space:
mode:
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):