]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix [ 738973 ] urllib2 CacheFTPHandler doesn't work on multiple dirs, as
authorMark Hammond <mhammond@skippinet.com.au>
Mon, 10 May 2004 00:32:34 +0000 (00:32 +0000)
committerMark Hammond <mhammond@skippinet.com.au>
Mon, 10 May 2004 00:32:34 +0000 (00:32 +0000)
implemented in patch [ 851736 ].

Lib/urllib2.py

index 9c3bcd54deaec5d0aa1e301c83bac8d0d360a9fc..d136485cd012480211eef97c960a62792feb111f 100644 (file)
@@ -1079,7 +1079,7 @@ class CacheFTPHandler(FTPHandler):
         self.max_conns = m
 
     def connect_ftp(self, user, passwd, host, port, dirs):
-        key = user, passwd, host, port
+        key = user, host, port, '/'.join(dirs)
         if key in self.cache:
             self.timeout[key] = time.time() + self.delay
         else: