This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients ajaksu2, chris.mahan, giampaolo.rodola, vstinner
Date 2009-01-03.01:14:57
SpamBayes Score 6.7393785e-07
Marked as misclassified No
Message-id <1230945299.15.0.911506327915.issue4791@psf.upfronthosting.co.za>
In-reply-to
Content
The traceback shows that the problem is not related to the socket 
created to retrieve the content of the directory listing, but 
the "main" socket (the one used for the whole ftp session) used by 
dir() command the retrieve the command answer code:

   Traceback (most recent call last):
     ftp.dir()
      => self.retrlines(cmd, func)
      => return self.voidresp()
      => line = self.getline()
      => line = self.file.readline() (ftplib.py:184)
      ...
    socket.timeout: timed out

I don't understand why the readline() blocks. It's maybe related to 
the newline: voidresp() uses getline() which reads a line using 
self.file. The file is created by self.sock.makefile('r', 
encoding=self.encoding) and so the newline is always \n whereas ftplib 
of Python2 uses \r\n (CRLF) or \n (LF).
History
Date User Action Args
2009-01-03 01:14:59vstinnersetrecipients: + vstinner, giampaolo.rodola, ajaksu2, chris.mahan
2009-01-03 01:14:59vstinnersetmessageid: <1230945299.15.0.911506327915.issue4791@psf.upfronthosting.co.za>
2009-01-03 01:14:58vstinnerlinkissue4791 messages
2009-01-03 01:14:57vstinnercreate