STINNER Victor <[email protected]> added the comment:
Can you paste the full output with debuglevel=3?
"if not line:" should be equivalent to "if len(line) == 0:" and to "if
line == '':".
ftp.dir() is equivalent to ftp.retrlines('LIST').
By default, the socket created to get the result of LIST has no
timeout (is blocking). So fp.readline() only returns an empty string
when the socket is closed (by the server).
fp is a io.BufferedReader(SocketIO(socket, "r"),
io.DEFAULT_BUFFER_SIZE).
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue4791>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com