mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
Fix wrong exception in _bootlocale (apparently this error condition is never triggered)
This commit is contained in:
@@ -13,7 +13,7 @@ if sys.platform.startswith("win"):
|
||||
else:
|
||||
try:
|
||||
_locale.CODESET
|
||||
except ImportError:
|
||||
except AttributeError:
|
||||
def getpreferredencoding(do_setlocale=True):
|
||||
# This path for legacy systems needs the more complex
|
||||
# getdefaultlocale() function, import the full locale module.
|
||||
|
||||
Reference in New Issue
Block a user