Issue #18200: Update the stdlib (except tests) to use
ModuleNotFoundError.
diff --git a/Lib/cmd.py b/Lib/cmd.py
index 859e910..58ee5f5 100644
--- a/Lib/cmd.py
+++ b/Lib/cmd.py
@@ -109,7 +109,7 @@
self.old_completer = readline.get_completer()
readline.set_completer(self.complete)
readline.parse_and_bind(self.completekey+": complete")
- except ImportError:
+ except ModuleNotFoundError:
pass
try:
if intro is not None:
@@ -143,7 +143,7 @@
try:
import readline
readline.set_completer(self.old_completer)
- except ImportError:
+ except ModuleNotFoundError:
pass