Lines Matching refs:ftp
77 # ftp errors aren't handled cleanly
705 # than http, https or ftp.
707 if urlparts.scheme not in ('http', 'https', 'ftp', ''):
829 # {'http': 'ftp://proxy.example.com'}, we may end up turning
831 # ftp://proxy.example.com/a
1537 raise URLError('ftp error: no host given')
1674 MAXFTPCACHE = 10 # Trim the ftp cache beyond this size
1729 # ftp cache by assigning to the .ftpcache member;
2042 raise URLError('ftp error: proxy support for ftp protocol currently not implemented')
2045 if not host: raise URLError('ftp error: no host given')
2086 mtype = mimetypes.guess_type("ftp:" + url)[0]
2093 return addinfourl(fp, headers, "ftp:" + url)
2095 raise URLError(f'ftp error: {exp}') from exp
2185 # than http, https and ftp.
2190 if urlparts.scheme not in ('http', 'https', 'ftp', ''):
2421 self.ftp = ftplib.FTP()
2422 self.ftp.connect(self.host, self.port, self.timeout)
2423 self.ftp.login(self.user, self.passwd)
2425 self.ftp.cwd(_target)
2433 self.ftp.voidcmd(cmd)
2436 self.ftp.voidcmd(cmd)
2442 conn, retrlen = self.ftp.ntransfercmd(cmd)
2445 raise URLError(f'ftp error: {reason}') from reason
2448 self.ftp.voidcmd('TYPE A')
2451 pwd = self.ftp.pwd()
2454 self.ftp.cwd(file)
2456 raise URLError('ftp error: %r' % reason) from reason
2458 self.ftp.cwd(pwd)
2462 conn, retrlen = self.ftp.ntransfercmd(cmd)
2476 self.ftp.voidresp()
2494 self.ftp.close()
2690 proxyServer = 'http={0};https={0};ftp={0}'.format(proxyServer)
2696 if protocol in ('http', 'https', 'ftp'):