]> granicus.if.org Git - python/commitdiff
Fix [ 738973 ] urllib2 CacheFTPHandler doesn't work on multiple dirs, as
authorMark Hammond <mhammond@skippinet.com.au>
Mon, 10 May 2004 07:35:33 +0000 (07:35 +0000)
committerMark Hammond <mhammond@skippinet.com.au>
Mon, 10 May 2004 07:35:33 +0000 (07:35 +0000)
implemented in patch [ 851736 ].

Lib/urllib2.py

index 1984cf294bb0d29f1b6ad4e90939496211ab8503..773cd7de824598954cf83108e88a4273382fa7d3 100644 (file)
@@ -1168,7 +1168,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: