[docs] [issue19154] AttributeError: 'NoneType' in http/client.py when using select when file descriptor is closed.

Florent Viard report at bugs.python.org
Tue Oct 8 19:17:34 CEST 2013


Florent Viard added the comment:

R. David, what you say is correct, supporting "select" that would be nice but i'm also not sure that is supposed to, and in that case, maybe select as to be fixed for that.

But:
a) As urllib2 through httplib provide publicly a fileno, i was excepting so.
b) The real point of my issue is that i noticed that there is 3 different return values, for the similar fileno function in 3 different modules of python, when the file descriptor is closed or inexistant:
- in urllib2->httplib: AttributeError as "None" as no "fileno()" attribute.
- in socket : ValueError
- in fileinput: -1

And for the 2 firsts, one is finally using the fileno function of the other.

----------

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


More information about the docs mailing list