Skip to content

Commit

Permalink
Merge branch 'master' into optimize-contextj
Browse files Browse the repository at this point in the history
  • Loading branch information
kjd authored Apr 11, 2024
2 parents 5beb28b + cd58a23 commit 0394ec7
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 0394ec7

Please sign in to comment.