diff --git a/doc/changelog.txt b/doc/changelog.txt index af8e252..1d6bdd3 100644 --- a/doc/changelog.txt +++ b/doc/changelog.txt @@ -9,8 +9,6 @@ Closes: GH bug #28 * Updated PyPI trove classifiers to include Python 3 Closes: GH bug #25 -* Escape output messages before logging them. - Closes: GH bug #29 1.8 (released 19.7.2015) diff --git a/patoolib/util.py b/patoolib/util.py index ff2e456..7e6f1eb 100644 --- a/patoolib/util.py +++ b/patoolib/util.py @@ -17,7 +17,6 @@ from __future__ import print_function import os import sys -import codecs import shutil import subprocess import mimetypes @@ -493,14 +492,6 @@ def get_single_outfile (directory, archive, extension=""): return outfile + extension -def init_log(): - """Wrap sys.stdout and sys.stderr in encoding-aware stream writers.""" - encoding = locale.getpreferredencoding() - errors = 'backslashreplace' - sys.stdout = codecs.getwriter(encoding)(sys.stdout, errors) - sys.stderr = codecs.getwriter(encoding)(sys.stderr, errors) - - def log_error (msg, out=sys.stderr): """Print error message to stderr (or any other given output).""" print("patool error:", msg, file=out) @@ -695,5 +686,4 @@ def chdir(directory): return olddir -init_log() init_mimedb()