summaryrefslogtreecommitdiff
path: root/pygments/cmdline.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2014-11-11 18:36:28 +0100
committerGeorg Brandl <georg@python.org>2014-11-11 18:36:28 +0100
commitcbe1e3e5132dceeb96b57195579567d49928c00e (patch)
tree5e20dc9161ac87206d46fd638a332ffaea388861 /pygments/cmdline.py
parent59f4e88549ddd1fa1ea010fa6f65efb0ef344dc4 (diff)
downloadpygments-cbe1e3e5132dceeb96b57195579567d49928c00e.tar.gz
(Hopefully) fix test_cmdline failures under Windows without colorama.
Diffstat (limited to 'pygments/cmdline.py')
-rw-r--r--pygments/cmdline.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pygments/cmdline.py b/pygments/cmdline.py
index 0dcda7ae..40c1a599 100644
--- a/pygments/cmdline.py
+++ b/pygments/cmdline.py
@@ -445,8 +445,8 @@ def main_inner(popts, args, usage):
fmter.name in ('Terminal', 'Terminal256'): # pragma: no cover
# unfortunately colorama doesn't support binary streams on Py3
if sys.version_info > (3,):
- import io
- outfile = io.TextIOWrapper(outfile, encoding=fmter.encoding)
+ from pygments.util import UnclosingTextIOWrapper
+ outfile = UnclosingTextIOWrapper(outfile, encoding=fmter.encoding)
fmter.encoding = None
try:
import colorama.initialise