Fix wrong exception in _bootlocale (apparently this error condition is never triggered)
This commit is contained in:
parent
e8785ff82a
commit
4aa8f8e225
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue