diff options
author | Brett Cannon <brett@python.org> | 2013-07-04 21:43:24 (GMT) |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2013-07-04 21:43:24 (GMT) |
commit | cd171c8e92c10d327151400fd8f16b11a4964615 (patch) | |
tree | db734100511572201a54a6b7ce1803bcea4c94da /Lib/http | |
parent | fff59155d40ede93594eb77f320e0bde658cce28 (diff) | |
download | cpython-cd171c8e92c10d327151400fd8f16b11a4964615.zip cpython-cd171c8e92c10d327151400fd8f16b11a4964615.tar.gz cpython-cd171c8e92c10d327151400fd8f16b11a4964615.tar.bz2 |
Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a)
Diffstat (limited to 'Lib/http')
-rw-r--r-- | Lib/http/client.py | 2 | ||||
-rw-r--r-- | Lib/http/cookiejar.py | 2 | ||||
-rw-r--r-- | Lib/http/server.py | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/Lib/http/client.py b/Lib/http/client.py index 188f4f6..939615b 100644 --- a/Lib/http/client.py +++ b/Lib/http/client.py @@ -1156,7 +1156,7 @@ class HTTPConnection: try: import ssl -except ModuleNotFoundError: +except ImportError: pass else: class HTTPSConnection(HTTPConnection): diff --git a/Lib/http/cookiejar.py b/Lib/http/cookiejar.py index fd40ee0..be828eb 100644 --- a/Lib/http/cookiejar.py +++ b/Lib/http/cookiejar.py @@ -35,7 +35,7 @@ import time import urllib.parse, urllib.request try: import threading as _threading -except ModuleNotFoundError: +except ImportError: import dummy_threading as _threading import http.client # only for the default HTTP port from calendar import timegm diff --git a/Lib/http/server.py b/Lib/http/server.py index 48e3f97..e47e034 100644 --- a/Lib/http/server.py +++ b/Lib/http/server.py @@ -904,7 +904,7 @@ def nobody_uid(): return nobody try: import pwd - except ModuleNotFoundError: + except ImportError: return -1 try: nobody = pwd.getpwnam('nobody')[2] |