[Python-checkins] r46917 - python/trunk/Lib/encodings/punycode.py

walter.doerwald python-checkins at python.org
Tue Jun 13 14:04:44 CEST 2006


Author: walter.doerwald
Date: Tue Jun 13 14:04:43 2006
New Revision: 46917

Modified:
   python/trunk/Lib/encodings/punycode.py
Log:
errors is an attribute in the incremental decoder
not an argument.


Modified: python/trunk/Lib/encodings/punycode.py
==============================================================================
--- python/trunk/Lib/encodings/punycode.py	(original)
+++ python/trunk/Lib/encodings/punycode.py	Tue Jun 13 14:04:43 2006
@@ -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


More information about the Python-checkins mailing list