summaryrefslogtreecommitdiffstats
path: root/Lib/urllib.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-04-30 09:23:59 (GMT)
committerGeorg Brandl <georg@python.org>2006-04-30 09:23:59 (GMT)
commit44a118af5043ed6919bd1d0bcfc603f496ae4d7c (patch)
tree84e047c1102dc675b61062daa84305b8e14a4814 /Lib/urllib.py
parentbffb0bc064c25032264037e3c0405d7ab0d3c149 (diff)
downloadcpython-44a118af5043ed6919bd1d0bcfc603f496ae4d7c.zip
cpython-44a118af5043ed6919bd1d0bcfc603f496ae4d7c.tar.gz
cpython-44a118af5043ed6919bd1d0bcfc603f496ae4d7c.tar.bz2
Patch #1470976: don't NLST files when retrieving over FTP.
Diffstat (limited to 'Lib/urllib.py')
-rw-r--r--Lib/urllib.py7
1 files changed, 0 insertions, 7 deletions
diff --git a/Lib/urllib.py b/Lib/urllib.py
index c1f6f60..5c02883 100644
--- a/Lib/urllib.py
+++ b/Lib/urllib.py
@@ -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