Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove redundant steps in alabel() #152

Merged
merged 4 commits into from Apr 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 1 addition & 6 deletions idna/core.py
Expand Up @@ -262,13 +262,8 @@ def alabel(label: str) -> bytes:
except UnicodeEncodeError:
pass

if not label:
raise IDNAError('No Input')

label = str(label)
check_label(label)
label_bytes = _punycode(label)
label_bytes = _alabel_prefix + label_bytes
label_bytes = _alabel_prefix + _punycode(label)

if not valid_label_length(label_bytes):
raise IDNAError('Label too long')
Expand Down