8000 gh-135069: Fix exception message in encodings.idna module (#135071) · python/cpython@8dc3383 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 8dc3383

Browse files
authored
gh-135069: Fix exception message in encodings.idna module (#135071)
1 parent 8f8bdf2 commit 8dc3383

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Lib/encodings/idna.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ def _buffer_encode(self, input, errors, final):
316316
class IncrementalDecoder(codecs.BufferedIncrementalDecoder):
317317
def _buffer_decode(self, input, errors, final):
318318
if errors != 'strict':
319-
raise UnicodeError("Unsupported error handling: {errors}")
319+
raise UnicodeError(f"Unsupported error handling: {errors}")
320320

321321
if not input:
322322
return ("", 0)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Fix the "Invalid error handling" exception in
2+
:class:`!encodings.idna.IncrementalDecoder` to correctly replace the
3+
'errors' parameter.

0 commit comments

Comments
 (0)
0