Comment 2 for bug 215522

Revision history for this message
John A Meinel (jameinel) wrote :

A patch like this should probably fix this:

=== modified file 'bzrlib/transport/ftp.py'
--- bzrlib/transport/ftp.py 2008-03-30 01:41:50 +0000
+++ bzrlib/transport/ftp.py 2008-04-18 19:04:09 +0000
@@ -513,6 +513,12 @@
             paths = f.nlst(basepath)
         except ftplib.error_perm, e:
             self._translate_perm_error(e, relpath, extra='error with list_dir')
+ except ftplib.error_temp, e:
+ if str(e).lower().startswith('450 no files found'):
+ # FTP Server XXXX returns an error code when a directory is
+ # empty
+ return []
+ raise
         # If FTP.nlst returns paths prefixed by relpath, strip 'em
         if paths and paths[0].startswith(basepath):
             entries = [path[len(basepath)+1:] for path in paths]

Could you tell us what server this is, and if possible, would a patch like this prevent the problem?