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