Commit 90dfd39c authored by Antoine Pitrou's avatar Antoine Pitrou

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

parent 22a236a1
...@@ -13,7 +13,7 @@ if sys.platform.startswith("win"): ...@@ -13,7 +13,7 @@ if sys.platform.startswith("win"):
else: else:
try: try:
_locale.CODESET _locale.CODESET
except ImportError: except AttributeError:
def getpreferredencoding(do_setlocale=True): def getpreferredencoding(do_setlocale=True):
# This path for legacy systems needs the more complex # This path for legacy systems needs the more complex
# getdefaultlocale() function, import the full locale module. # getdefaultlocale() function, import the full locale module.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment