Fix wrong exception in _bootlocale (apparently this error condition is never triggered)
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 @@
 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.