Skip to content

Commit

Permalink
Fix _locales_to_names: Call str() on the parameter variable instead o…
Browse files Browse the repository at this point in the history
…f the module object. (#1038)

Co-authored-by: Daniel Trachsel <daniel.trachsel@borm.ch>
  • Loading branch information
DI84 and Daniel Trachsel committed Oct 24, 2023
1 parent eeb2feb commit 139dc11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion babel/support.py
Expand Up @@ -705,7 +705,7 @@ def _locales_to_names(
if locales is None:
return None
if isinstance(locales, Locale):
return [str(locale)]
return [str(locales)]
if isinstance(locales, str):
return [locales]
return [str(locale) for locale in locales]

0 comments on commit 139dc11

Please sign in to comment.