Kaydet (Commit) c6f5b3ad authored tarafından Walter Dörwald's avatar Walter Dörwald

errors is an attribute in the incremental decoder

not an argument.
üst 6b6e2bb8
...@@ -214,9 +214,9 @@ class IncrementalEncoder(codecs.IncrementalEncoder): ...@@ -214,9 +214,9 @@ class IncrementalEncoder(codecs.IncrementalEncoder):
class IncrementalDecoder(codecs.IncrementalDecoder): class IncrementalDecoder(codecs.IncrementalDecoder):
def decode(self, input, final=False): def decode(self, input, final=False):
if errors not in ('strict', 'replace', 'ignore'): if self.errors not in ('strict', 'replace', 'ignore'):
raise UnicodeError, "Unsupported error handling "+errors raise UnicodeError, "Unsupported error handling "+self.errors
return punycode_decode(input, errors) return punycode_decode(input, self.errors)
class StreamWriter(Codec,codecs.StreamWriter): class StreamWriter(Codec,codecs.StreamWriter):
pass pass
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment