From: Antoine Pitrou Date: Sat, 12 Oct 2013 13:00:44 +0000 (+0200) Subject: Fix wrong exception in _bootlocale (apparently this error condition is never triggered) X-Git-Tag: v3.4.0a4~169 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4aa8f8e225afeec1726a68e596b16dc4ecf2225d;p=thirdparty%2FPython%2Fcpython.git Fix wrong exception in _bootlocale (apparently this error condition is never triggered) --- diff --git a/Lib/_bootlocale.py b/Lib/_bootlocale.py index efe402375ae0..4bccac1139f0 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.