mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Correcting issue 12576 fix, which resulted in buildbot failures.
This commit is contained in:
parent
f25e3d5278
commit
45686b472b
1 changed files with 3 additions and 6 deletions
|
@ -1135,13 +1135,10 @@ class AbstractHTTPHandler(BaseHandler):
|
|||
try:
|
||||
h.request(req.get_method(), req.selector, req.data, headers)
|
||||
except socket.error as err: # timeout error
|
||||
h.close()
|
||||
raise URLError(err)
|
||||
finally:
|
||||
try:
|
||||
r = h.getresponse() # an HTTPResponse instance
|
||||
except Exception as exp:
|
||||
h.close()
|
||||
raise exp
|
||||
else:
|
||||
r = h.getresponse()
|
||||
|
||||
r.url = req.get_full_url()
|
||||
# This line replaces the .msg attribute of the HTTPResponse
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue