Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion babel/localedata.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ def exists(name: str) -> bool:
if name in _cache:
return True
file_found = os.path.exists(resolve_locale_filename(name))
return True if file_found else bool(normalize_locale(name))
if file_found or normalize_locale(name):
_cache.setdefault(name, {})
return True
return False


@lru_cache(maxsize=None)
Expand Down
Loading