summaryrefslogtreecommitdiff
path: root/Lib/http
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2020-11-20 09:26:07 +0100
committerGitHub <noreply@github.com>2020-11-20 00:26:07 -0800
commit03c8ddd9e94c7bddf1f06cf785027b8d2bf00ff0 (patch)
treee293c334cb6fee7b5826b21e26ab3c56a2d2fd20 /Lib/http
parent7ddbaa7a1b3e61847ee99658be6a7268a049e302 (diff)
downloadcpython-git-03c8ddd9e94c7bddf1f06cf785027b8d2bf00ff0.tar.gz
bpo-42413: socket.timeout is now an alias of TimeoutError (GH-23413)
Signed-off-by: Christian Heimes <christian@python.org>
Diffstat (limited to 'Lib/http')
-rw-r--r--Lib/http/server.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/http/server.py b/Lib/http/server.py
index fa204fbc15..ee99182109 100644
--- a/Lib/http/server.py
+++ b/Lib/http/server.py
@@ -414,7 +414,7 @@ class BaseHTTPRequestHandler(socketserver.StreamRequestHandler):
method = getattr(self, mname)
method()
self.wfile.flush() #actually send the response if not already done.
- except socket.timeout as e:
+ except TimeoutError as e:
#a read or a write timed out. Discard this connection
self.log_error("Request timed out: %r", e)
self.close_connection = True