Patch #1470976: don't NLST files when retrieving over FTP.

This commit is contained in:
Georg Brandl 2006-04-30 09:23:59 +00:00
parent bffb0bc064
commit 44a118af50
1 changed files with 0 additions and 7 deletions

View File

@ -856,13 +856,6 @@ class ftpwrapper:
self.ftp.voidcmd(cmd)
conn = None
if file and not isdir:
# Use nlst to see if the file exists at all
try:
self.ftp.nlst(file)
except ftplib.error_perm, reason:
raise IOError, ('ftp error', reason), sys.exc_info()[2]
# Restore the transfer mode!
self.ftp.voidcmd(cmd)
# Try to retrieve as a file
try:
cmd = 'RETR ' + file