Fix for bug #222395: UTF-16 et al. don't handle .readline().
They now raise an NotImplementedError to hint to the truth ;-)
This commit is contained in:
parent
ffdd22f1af
commit
3ccb09cba3
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue