summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2013-10-12 13:00:44 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2013-10-12 13:00:44 (GMT)
commit4aa8f8e225afeec1726a68e596b16dc4ecf2225d (patch)
treebe19b134fcb961525365e7b08631af2f6d3bc07f
parente8785ff82a1b3227ace7c52979624756d32b393f (diff)
downloadcpython-4aa8f8e225afeec1726a68e596b16dc4ecf2225d.zip
cpython-4aa8f8e225afeec1726a68e596b16dc4ecf2225d.tar.gz
cpython-4aa8f8e225afeec1726a68e596b16dc4ecf2225d.tar.bz2
Fix wrong exception in _bootlocale (apparently this error condition is never triggered)
-rw-r--r--Lib/_bootlocale.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/_bootlocale.py b/Lib/_bootlocale.py
index efe4023..4bccac1 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.