[issue4791] retrlines('LIST') and dir hang at end of listing in ftplib (python3.0)
STINNER Victor
report at bugs.python.org
Tue Jan 6 00:43:46 CET 2009
STINNER Victor <victor.stinner at haypocalc.com> added the comment:
New patch:
- Change _socket.fileno() behaviour: raise socket.error("I/O
operation on closed socket") (instead of returning -1) if the socket
is closed
- Change SocketIO.fileno(): raise a socket.error("I/O operation on
closed socket") if the file is closed, even if the socket is still
open
TODO: Check all operations on closed _socket, socket or SocketIO and
make sure that it raises also an error.
exakrun on IRC:
What's the fascination with -1?
Isn't this Python? How about an exception? Or at least a different
type... None, perhaps?
Returning -1 is what you would do in a language like C where you
*can't* do something nice.
Added file: http://bugs.python.org/file12611/socket_real_close-3.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4791>
_______________________________________
More information about the Python-bugs-list
mailing list