Commit 3ccb09cb authored by Marc-André Lemburg's avatar Marc-André Lemburg

Fix for bug #222395: UTF-16 et al. don't handle .readline().

They now raise an NotImplementedError to hint to the truth ;-)
parent ffdd22f1
......@@ -53,6 +53,9 @@ class StreamReader(Codec,codecs.StreamReader):
self.bom_read = 1
return codecs.StreamReader.read(self, size)
def readline(self, size=None):
raise NotImplementedError, '.readline() is not implemented for UTF-16'
### encodings module API
def getregentry():
......
......@@ -21,7 +21,9 @@ class StreamWriter(Codec,codecs.StreamWriter):
pass
class StreamReader(Codec,codecs.StreamReader):
pass
def readline(self, size=None):
raise NotImplementedError, '.readline() is not implemented for UTF-16-BE'
### encodings module API
......
......@@ -21,7 +21,9 @@ class StreamWriter(Codec,codecs.StreamWriter):
pass
class StreamReader(Codec,codecs.StreamReader):
pass
def readline(self, size=None):
raise NotImplementedError, '.readline() is not implemented for UTF-16-LE'
### encodings module API
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment