summaryrefslogtreecommitdiff
path: root/Lib/encodings/utf_16.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/encodings/utf_16.py')
-rw-r--r--Lib/encodings/utf_16.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/encodings/utf_16.py b/Lib/encodings/utf_16.py
index a33581c58b..95abb05624 100644
--- a/Lib/encodings/utf_16.py
+++ b/Lib/encodings/utf_16.py
@@ -31,6 +31,13 @@ class StreamWriter(codecs.StreamWriter):
class StreamReader(codecs.StreamReader):
+ def reset(self):
+ codecs.StreamReader.reset(self)
+ try:
+ del self.decode
+ except AttributeError:
+ pass
+
def decode(self, input, errors='strict'):
(object, consumed, byteorder) = \
codecs.utf_16_ex_decode(input, errors, 0, False)