summaryrefslogtreecommitdiff
path: root/pygments/util.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
commitbe15c4534efc5e79a4c823297768723641886576 (patch)
tree3e823a329bed0c34d634e95f6bde651a071b97fe /pygments/util.py
parent51d35f516f952edfea4ea6c7b3661d2a47e164d3 (diff)
downloadpygments-be15c4534efc5e79a4c823297768723641886576.tar.gz
(Hopefully) fix test_cmdline failures under Windows without colorama.
Diffstat (limited to 'pygments/util.py')
-rw-r--r--pygments/util.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/pygments/util.py b/pygments/util.py
index 9f683c0e..86713219 100644
--- a/pygments/util.py
+++ b/pygments/util.py
@@ -362,7 +362,12 @@ else:
u_prefix = ''
iteritems = dict.items
itervalues = dict.values
- from io import StringIO, BytesIO
+ from io import StringIO, BytesIO, TextIOWrapper
+
+ class UnclosingTextIOWrapper(TextIOWrapper):
+ # Don't close underlying buffer on destruction.
+ def close(self):
+ pass
def add_metaclass(metaclass):