httplib.py crashed constructing an HTTPResponse for None socket
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python2.6 (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I've been getting these crashes sporadically with launchpadlib scripts. It happens very intermittently, perhaps once every 20-30 runs (about once every few days). Typical example:
File "/srv/Source/
'date_
File "/usr/lib/
return super(Entry, self)._
File "/usr/lib/
return self.lp_
File "/usr/lib/
self.
File "/usr/lib/
representation = self._root.
File "/usr/lib/
response, content = self._request(url, extra_headers=
File "/usr/lib/
str(url), method=method, body=data, headers=headers)
File "/usr/lib/
url, method=method, body=body, headers=headers)
File "/usr/lib/
(response, new_content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections
, cachekey)
File "/usr/lib/
redirections, cachekey)
File "/usr/lib/
(response, content) = self._conn_
File "/usr/lib/
response = conn.getresponse()
File "/usr/lib/
method=
File "/usr/lib/
self.fp = sock.makefile('rb', 0)
AttributeError: 'NoneType' object has no attribute 'makefile'
Perhaps the HTTPResponse __init__ needs to check the sock arg before using it?
Or maybe would be better for HTTPConnection to check the socket validity before constructing a response with it?
Support for this version has ended