ftplib.FTP.nlst() behaviour on empty dirs

Discussion in 'Python' started by Mikael, Jul 14, 2004.

  1. Mikael

    Mikael Guest

    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
     
    Mikael, Jul 14, 2004
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stephen Horne
    Replies:
    2
    Views:
    552
    Stephen Horne
    Feb 22, 2004
  2. Beeyah
    Replies:
    0
    Views:
    325
    Beeyah
    Aug 2, 2004
  3. Tim Williams
    Replies:
    0
    Views:
    3,221
    Tim Williams
    Oct 20, 2004
  4. Nico Grubert
    Replies:
    0
    Views:
    874
    Nico Grubert
    Nov 24, 2005
  5. aum
    Replies:
    1
    Views:
    876
    Fredrik Lundh
    Jun 29, 2006
  6. ChaosKCW

    FTP (ftplib) output capture

    ChaosKCW, Jul 31, 2006, in forum: Python
    Replies:
    2
    Views:
    404
    ChaosKCW
    Aug 1, 2006
  7. loial
    Replies:
    1
    Views:
    2,052
    Giampaolo Rodola'
    Dec 7, 2007
  8. D. Buck
    Replies:
    2
    Views:
    959
    D. Buck
    Jun 29, 2004
Loading...