Skip to content

Commit

Permalink
Address comment by @akx
Browse files Browse the repository at this point in the history
See python-babel#947 (comment)

Signed-off-by: martin f. krafft <[email protected]>
  • Loading branch information
madduck committed Jan 20, 2023
1 parent bc1559a commit 386078a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions babel/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ def __init__(
self.__data = None

identifier = str(self)
withoutmodifier = identifier.split('@', 1)[0]
if not localedata.exists(withoutmodifier):
identifier_without_modifier = identifier.partition('@')[0]
if not localedata.exists(identifier_without_modifier):
raise UnknownLocaleError(identifier)

@classmethod
Expand Down

0 comments on commit 386078a

Please sign in to comment.