Skip to content

Commit 4aa8f8e

Browse files
committed
Fix wrong exception in _bootlocale (apparently this error condition is never triggered)
1 parent e8785ff commit 4aa8f8e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/_bootlocale.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def getpreferredencoding(do_setlocale=True):
1313
else:
1414
try:
1515
_locale.CODESET
16-
except ImportError:
16+
except AttributeError:
1717
def getpreferredencoding(do_setlocale=True):
1818
# This path for legacy systems needs the more complex
1919
# getdefaultlocale() function, import the full locale module.

0 commit comments

Comments
 (0)