diff options
author | Walter Dörwald <walter@livinglogic.de> | 2006-06-13 12:02:12 (GMT) |
---|---|---|
committer | Walter Dörwald <walter@livinglogic.de> | 2006-06-13 12:02:12 (GMT) |
commit | 6b6e2bb8b1a7ca405440cd371ceabf3d35cb592b (patch) | |
tree | 9275c8fb11e236d4e3bc5a56b0d9587ab9169ac7 | |
parent | aabc5f6f2fb2110f4257fb3ae84768577d0b4e4e (diff) | |
download | cpython-6b6e2bb8b1a7ca405440cd371ceabf3d35cb592b.zip cpython-6b6e2bb8b1a7ca405440cd371ceabf3d35cb592b.tar.gz cpython-6b6e2bb8b1a7ca405440cd371ceabf3d35cb592b.tar.bz2 |
Fix passing errors to the encoder and decoder functions.
-rw-r--r-- | Lib/encodings/utf_8_sig.py | 4 | ||||
-rw-r--r-- | Lib/encodings/uu_codec.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Lib/encodings/utf_8_sig.py b/Lib/encodings/utf_8_sig.py index cd14ab0..f05f6b8 100644 --- a/Lib/encodings/utf_8_sig.py +++ b/Lib/encodings/utf_8_sig.py @@ -30,9 +30,9 @@ class IncrementalEncoder(codecs.IncrementalEncoder): def encode(self, input, final=False): if self.first: self.first = False - return codecs.BOM_UTF8 + codecs.utf_8_encode(input, errors)[0] + return codecs.BOM_UTF8 + codecs.utf_8_encode(input, self.errors)[0] else: - return codecs.utf_8_encode(input, errors)[0] + return codecs.utf_8_encode(input, self.errors)[0] def reset(self): codecs.IncrementalEncoder.reset(self) diff --git a/Lib/encodings/uu_codec.py b/Lib/encodings/uu_codec.py index 0877fe1..43fb93c 100644 --- a/Lib/encodings/uu_codec.py +++ b/Lib/encodings/uu_codec.py @@ -102,11 +102,11 @@ class Codec(codecs.Codec): class IncrementalEncoder(codecs.IncrementalEncoder): def encode(self, input, final=False): - return uu_encode(input, errors)[0] + return uu_encode(input, self.errors)[0] class IncrementalDecoder(codecs.IncrementalDecoder): def decode(self, input, final=False): - return uu_decode(input, errors)[0] + return uu_decode(input, self.errors)[0] class StreamWriter(Codec,codecs.StreamWriter): pass |