From 7529447c475e977b756ace821fd73496ff6143e5 Mon Sep 17 00:00:00 2001 From: Tomas Roun Date: Sun, 19 Jan 2025 12:45:26 +0100 Subject: [PATCH 1/2] Fix bare except in test_uuid --- Lib/test/test_uuid.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_uuid.py b/Lib/test/test_uuid.py index 8f40dd97f42fdc..3b8e741ce14241 100755 --- a/Lib/test/test_uuid.py +++ b/Lib/test/test_uuid.py @@ -21,7 +21,7 @@ def importable(name): try: __import__(name) return True - except: + except ImportError: return False From 5f5c0db09eb837f4a52fa6caf54fd116d682aaf1 Mon Sep 17 00:00:00 2001 From: "Tomas R." Date: Sun, 19 Jan 2025 13:16:56 +0100 Subject: [PATCH 2/2] Use `ModuleNotFoundError` Co-authored-by: Thomas Grainger --- Lib/test/test_uuid.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_uuid.py b/Lib/test/test_uuid.py index 3b8e741ce14241..2e3fb1141c2667 100755 --- a/Lib/test/test_uuid.py +++ b/Lib/test/test_uuid.py @@ -21,7 +21,7 @@ def importable(name): try: __import__(name) return True - except ImportError: + except ModuleNotFoundError: return False