ftplib.nlst gives error on empty directory

loial jldunn2000 at googlemail.com
Fri Dec 7 04:42:23 EST 2007


Trying to use ftplib.FTP.nlst()  method to list the files in
a directory on a FTP server.

It works fine except when there are no files in the directory. Then it
gives the error

ftplib.error_perm: 550 No files found.

How can I handle this cleanly?






More information about the Python-list mailing list