From: Daniel Date: Tue, 24 Oct 2023 14:19:32 +0000 (+0200) Subject: Fix _locales_to_names: Call str() on the parameter variable instead of the module... X-Git-Tag: v2.13.1~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=139dc11baeb3bbd3bcbb900abb3519e71521a3f7;p=thirdparty%2Fbabel.git Fix _locales_to_names: Call str() on the parameter variable instead of the module object. (#1038) Co-authored-by: Daniel Trachsel --- 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]