mirror of https://github.com/python/cpython
merge heads
This commit is contained in:
commit
3fdf9d43e5
|
@ -525,7 +525,7 @@ def setlocale(category, locale=None):
|
|||
category may be given as one of the LC_* values.
|
||||
|
||||
"""
|
||||
if locale and type(locale) is not type(""):
|
||||
if locale and not isinstance(locale, basestring):
|
||||
# convert to string
|
||||
locale = normalize(_build_localename(locale))
|
||||
return _setlocale(category, locale)
|
||||
|
|
Loading…
Reference in New Issue