summaryrefslogtreecommitdiff
path: root/pygments/util.py
diff options
context:
space:
mode:
authorTim Hatch <tim@timhatch.com>2015-10-27 08:08:09 -0700
committerTim Hatch <tim@timhatch.com>2015-10-27 08:08:09 -0700
commit0c6c714008e42416f3ae92c4427da0d9f28d8d89 (patch)
tree488a67deed509a655c39c02ad4089cf1d1f2a56c /pygments/util.py
parent7bc19a5fd1fb7e40c8ec4937a0fe45ddb56b5509 (diff)
downloadpygments-0c6c714008e42416f3ae92c4427da0d9f28d8d89.tar.gz
Fixes #1153: Change Windows+Py3 workaround code to flush when finished.
This avoids a case where the last chunk might not be output in iPython Notebook on Windows.
Diffstat (limited to 'pygments/util.py')
-rw-r--r--pygments/util.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pygments/util.py b/pygments/util.py
index 0859c05d..07b662d0 100644
--- a/pygments/util.py
+++ b/pygments/util.py
@@ -372,7 +372,7 @@ else:
class UnclosingTextIOWrapper(TextIOWrapper):
# Don't close underlying buffer on destruction.
def close(self):
- pass
+ self.flush()
def add_metaclass(metaclass):