errors is an attribute in the incremental decoder
not an argument.
diff --git a/Lib/encodings/punycode.py b/Lib/encodings/punycode.py
index 2cde8b9..d97200f 100644
--- a/Lib/encodings/punycode.py
+++ b/Lib/encodings/punycode.py
@@ -214,9 +214,9 @@
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