summaryrefslogtreecommitdiff
path: root/Lib/_bootlocale.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2013-10-12 15:00:44 +0200
committerAntoine Pitrou <solipsis@pitrou.net>2013-10-12 15:00:44 +0200
commit4aa8f8e225afeec1726a68e596b16dc4ecf2225d (patch)
treebe19b134fcb961525365e7b08631af2f6d3bc07f /Lib/_bootlocale.py
parente8785ff82a1b3227ace7c52979624756d32b393f (diff)
downloadcpython-git-4aa8f8e225afeec1726a68e596b16dc4ecf2225d.tar.gz
Fix wrong exception in _bootlocale (apparently this error condition is never triggered)
Diffstat (limited to 'Lib/_bootlocale.py')
-rw-r--r--Lib/_bootlocale.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/_bootlocale.py b/Lib/_bootlocale.py
index efe402375a..4bccac1139 100644
--- a/Lib/_bootlocale.py
+++ b/Lib/_bootlocale.py
@@ -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.