summaryrefslogtreecommitdiff
path: root/Lib/_pyio.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-06-29 03:34:34 -0700
committerGitHub <noreply@github.com>2018-06-29 03:34:34 -0700
commiteabebbb54c2604fd8d08e8019ea1be634aed8c2f (patch)
tree753a4129f0ff70097c60b461f916f230352d747b /Lib/_pyio.py
parentd0b442803ad4ba66b0bdb3cf183179d4c9a56f06 (diff)
downloadcpython-git-eabebbb54c2604fd8d08e8019ea1be634aed8c2f.tar.gz
bpo-25862: Fix assertion failures in io.TextIOWrapper.tell(). (GH-3918)
(cherry picked from commit 23db935bcf258657682e66464bf8512def8af830) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
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()