Thanks to visit codestin.com
Credit goes to github.com

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

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/_bootlocale.py

Lines changed: 1 addition & 1 deletion
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)