From: Walter Dörwald Date: Tue, 13 Jun 2006 12:04:43 +0000 (+0000) Subject: errors is an attribute in the incremental decoder X-Git-Tag: v2.5b1~85 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c6f5b3ad6c9e93235f9aa53d1ed8086030fbcd6c;p=thirdparty%2FPython%2Fcpython.git errors is an attribute in the incremental decoder not an argument. --- diff --git a/Lib/encodings/punycode.py b/Lib/encodings/punycode.py index 2cde8b93a8e1..d97200fd35b1 100644 --- a/Lib/encodings/punycode.py +++ b/Lib/encodings/punycode.py @@ -214,9 +214,9 @@ class IncrementalEncoder(codecs.IncrementalEncoder): class IncrementalDecoder(codecs.IncrementalDecoder): def decode(self, input, final=False): - if errors not in ('strict', 'replace', 'ignore'): - raise UnicodeError, "Unsupported error handling "+errors - return punycode_decode(input, errors) + if self.errors not in ('strict', 'replace', 'ignore'): + raise UnicodeError, "Unsupported error handling "+self.errors + return punycode_decode(input, self.errors) class StreamWriter(Codec,codecs.StreamWriter): pass