mirror of
https://github.com/python/cpython.git
synced 2025-07-29 14:15:07 +00:00
Patch #1470976: don't NLST files when retrieving over FTP.
This commit is contained in:
parent
bffb0bc064
commit
44a118af50
1 changed files with 0 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue