Issue #18200: Update the stdlib (except tests) to use
ModuleNotFoundError.
diff --git a/Lib/distutils/util.py b/Lib/distutils/util.py
index a2f9544..e241f59 100644
--- a/Lib/distutils/util.py
+++ b/Lib/distutils/util.py
@@ -388,7 +388,7 @@
         try:
             from tempfile import mkstemp
             (script_fd, script_name) = mkstemp(".py")
-        except ImportError:
+        except ModuleNotFoundError:
             from tempfile import mktemp
             (script_fd, script_name) = None, mktemp(".py")
         log.info("writing byte-compilation script '%s'", script_name)