Fix wrong exception in _bootlocale (apparently this error condition is never triggered)

This commit is contained in:
Antoine Pitrou 2013-10-12 15:00:44 +02:00
parent e8785ff82a
commit 4aa8f8e225
1 changed files with 1 additions and 1 deletions

View File

@ -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.