ftplib.FTP.nlst() behaviour on empty dirs

Mikael no at no.no
Wed Jul 14 13:48:29 EDT 2004


Hello,

I am using the ftplib.FTP.nlst()  method to list the files in
a directory on a FTP server. But when the directoty is empty,
python raises an error:

ftplib.error_perm: 550 No files found.

I find this behaviour very strange. Why not simply return an empty
list?

What do I do?

/M



More information about the Python-list mailing list