From 139dc11baeb3bbd3bcbb900abb3519e71521a3f7 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 24 Oct 2023 16:19:32 +0200 Subject: [PATCH] Fix _locales_to_names: Call str() on the parameter variable instead of the module object. (#1038) Co-authored-by: Daniel Trachsel --- babel/support.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/babel/support.py b/babel/support.py index e0a76b2d..43b40634 100644 --- a/babel/support.py +++ b/babel/support.py @@ -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] -- 2.47.2