From: Mark Hammond Date: Mon, 10 May 2004 00:32:34 +0000 (+0000) Subject: Fix [ 738973 ] urllib2 CacheFTPHandler doesn't work on multiple dirs, as X-Git-Tag: v2.3.4c1~25 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1d53b5cd1714c52cfdad1ef028da7136b0d75d2a;p=thirdparty%2FPython%2Fcpython.git Fix [ 738973 ] urllib2 CacheFTPHandler doesn't work on multiple dirs, as implemented in patch [ 851736 ]. --- diff --git a/Lib/urllib2.py b/Lib/urllib2.py index 9c3bcd54deae..d136485cd012 100644 --- a/Lib/urllib2.py +++ b/Lib/urllib2.py @@ -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: