From cd171c8e92c10d327151400fd8f16b11a4964615 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Thu, 4 Jul 2013 17:43:24 -0400 Subject: Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a) --- Lib/urllib/request.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Lib/urllib/request.py') diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py index d54b9747fb..4765a94288 100644 --- a/Lib/urllib/request.py +++ b/Lib/urllib/request.py @@ -110,7 +110,7 @@ from urllib.response import addinfourl, addclosehook # check for SSL try: import ssl -except ModuleNotFoundError: +except ImportError: _have_ssl = False else: _have_ssl = True @@ -2512,7 +2512,7 @@ elif os.name == 'nt': proxies = {} try: import winreg - except ModuleNotFoundError: + except ImportError: # Std module, so should be around - but you never know! return proxies try: @@ -2560,7 +2560,7 @@ elif os.name == 'nt': def proxy_bypass_registry(host): try: import winreg - except ModuleNotFoundError: + except ImportError: # Std modules, so should be around - but you never know! return 0 try: -- cgit v1.2.1