Issue #18200: Update the stdlib (except tests) to use
ModuleNotFoundError.
diff --git a/Lib/logging/config.py b/Lib/logging/config.py
index b882a62..4354dd1 100644
--- a/Lib/logging/config.py
+++ b/Lib/logging/config.py
@@ -30,7 +30,7 @@
 try:
     import _thread as thread
     import threading
-except ImportError: #pragma: no cover
+except ModuleNotFoundError: #pragma: no cover
     thread = None
 
 from socketserver import ThreadingTCPServer, StreamRequestHandler