Skip to content

Commit

Permalink
Remove redundant steps
Browse files Browse the repository at this point in the history
  • Loading branch information
elliotwutingfeng committed Nov 22, 2023
1 parent cab054c commit 068f48f
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions idna/core.py
Original file line number Diff line number Diff line change
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

0 comments on commit 068f48f

Please sign in to comment.