Issue #18200: Update the stdlib (except tests) to use
ModuleNotFoundError.
diff --git a/Lib/getpass.py b/Lib/getpass.py
index 6ec6c788..ed9bc59 100644
--- a/Lib/getpass.py
+++ b/Lib/getpass.py
@@ -164,7 +164,7 @@
 except (ImportError, AttributeError):
     try:
         import msvcrt
-    except ImportError:
+    except ModuleNotFoundError:
         getpass = fallback_getpass
     else:
         getpass = win_getpass