]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix wrong exception in _bootlocale (apparently this error condition is never triggered)
authorAntoine Pitrou <solipsis@pitrou.net>
Sat, 12 Oct 2013 13:00:44 +0000 (15:00 +0200)
committerAntoine Pitrou <solipsis@pitrou.net>
Sat, 12 Oct 2013 13:00:44 +0000 (15:00 +0200)
Lib/_bootlocale.py

index efe402375ae0d54f50e33d9794d9c74d9fc2fe44..4bccac1139f0bf48f819de54207339882c115b69 100644 (file)
@@ -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.