We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1b12148 + c095c75 commit cd58a23Copy full SHA for cd58a23
1 file changed
idna/core.py
@@ -262,13 +262,8 @@ def alabel(label: str) -> bytes:
262
except UnicodeEncodeError:
263
pass
264
265
- if not label:
266
- raise IDNAError('No Input')
267
-
268
- label = str(label)
269
check_label(label)
270
- label_bytes = _punycode(label)
271
- label_bytes = _alabel_prefix + label_bytes
+ label_bytes = _alabel_prefix + _punycode(label)
272
273
if not valid_label_length(label_bytes):
274
raise IDNAError('Label too long')
0 commit comments