[issue1327971] HTTPResponse instance has no attribute 'fileno'

Brett Cannon report at bugs.python.org
Tue Feb 10 20:34:50 CET 2009


Brett Cannon <brett at python.org> added the comment:

Georg is right and this has been fixed apparently in 3.0, leaving 2.7
and older broken.

There are two possible solutions to this. One is to change
socket._fileobject.fileno() to simply try self._sock.fp.fileno() if
self._sock.fileno() does not exist. The other option is to add a
__getattr__ to httplib.HTTPResponse to redirect to self.fp. Anyone have
an opinion?

----------
nosy: +brett.cannon
stage:  -> test needed
versions: +Python 2.4, Python 2.5, Python 2.6, Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1327971>
_______________________________________


More information about the Python-bugs-list mailing list