From 4aa8f8e225afeec1726a68e596b16dc4ecf2225d Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Sat, 12 Oct 2013 15:00:44 +0200 Subject: Fix wrong exception in _bootlocale (apparently this error condition is never triggered) --- Lib/_bootlocale.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. -- cgit v0.12