summaryrefslogtreecommitdiff
path: root/Lib/_pyio.py
diff options
context:
space:
mode:
authorZackery Spytz <zspytz@gmail.com>2018-06-29 04:14:58 -0600
committerSerhiy Storchaka <storchaka@gmail.com>2018-06-29 13:14:58 +0300
commit23db935bcf258657682e66464bf8512def8af830 (patch)
tree1ee4e96c8aba659a705a51e307de77a0f97e00fc /Lib/_pyio.py
parentbda9c3eae3ad16e43145599ac6359bfdcaf1fd4a (diff)
downloadcpython-git-23db935bcf258657682e66464bf8512def8af830.tar.gz
bpo-25862: Fix assertion failures in io.TextIOWrapper.tell(). (GH-3918)
Diffstat (limited to 'Lib/_pyio.py')
-rw-r--r--Lib/_pyio.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/_pyio.py b/Lib/_pyio.py
index c91a647a2f..f0d4f4ed27 100644
--- a/Lib/_pyio.py
+++ b/Lib/_pyio.py
@@ -2149,6 +2149,7 @@ class TextIOWrapper(TextIOBase):
self.buffer.write(b)
if self._line_buffering and (haslf or "\r" in s):
self.flush()
+ self._set_decoded_chars('')
self._snapshot = None
if self._decoder:
self._decoder.reset()