]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
errors is an attribute in the incremental decoder
authorWalter Dörwald <walter@livinglogic.de>
Tue, 13 Jun 2006 12:04:43 +0000 (12:04 +0000)
committerWalter Dörwald <walter@livinglogic.de>
Tue, 13 Jun 2006 12:04:43 +0000 (12:04 +0000)
not an argument.

Lib/encodings/punycode.py

index 2cde8b93a8e1bbcc347e591cfae8e390a462b3d6..d97200fd35b11fa5a0bc68af79904e5b11751494 100644 (file)
@@ -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