(self, user, passwd, host, port, dirs, timeout)
| 1583 | self.max_conns = m |
| 1584 | |
| 1585 | def connect_ftp(self, user, passwd, host, port, dirs, timeout): |
| 1586 | key = user, host, port, '/'.join(dirs), timeout |
| 1587 | conn = self.cache.get(key) |
| 1588 | if conn is None or not conn.keepalive: |
| 1589 | if conn is not None: |
| 1590 | conn.close() |
| 1591 | conn = self.cache[key] = ftpwrapper(user, passwd, host, port, |
| 1592 | dirs, timeout) |
| 1593 | self.timeout[key] = time.time() + self.delay |
| 1594 | self.check_cache() |
| 1595 | return conn |
| 1596 | |
| 1597 | def check_cache(self): |
| 1598 | # first check for old ones |
nothing calls this directly
no test coverage detected