예제 #1
0
 def __init__(self,ftp_server,username,password,port,timeout=10,acct='', keyfile=None,certfile=None,):
     FTP_TLS.__init__(self, '', '','', acct, keyfile, certfile, timeout)
     self.ftp_server = ftp_server
     self.username = username
     self.password = password
     self.port = port
     self.timeout = timeout
     self.ftp = None
예제 #2
0
 def __init__(self,
              host='',
              user='',
              passwd='',
              acct='',
              keyfile=None,
              certfile=None,
              timeout=60):
     FTP_TLS.__init__(self, host, user, passwd, acct, keyfile, certfile,
                      timeout)
예제 #3
0
    def __init__(self,
                 host,
                 netrc_file=os.path.join(os.path.expanduser('~'), '.netrc')):
        try:
            net_id = netrc(netrc_file).hosts[host]
        except KeyError:
            raise RuntimeError(
                'The host "{0}" is not defined in the netrc file {1}'.format(
                    host, netrc_file))

        FTP_TLS.__init__(self, host, net_id[0], net_id[2])
예제 #4
0
 def __init__(
     self,
     ftp_server,
     username,
     password,
     port,
     timeout=10,
     acct='',
     keyfile=None,
     certfile=None,
 ):
     FTP_TLS.__init__(self, '', '', '', acct, keyfile, certfile, timeout)
     self.ftp_server = ftp_server
     self.username = username
     self.password = password
     self.port = port
     self.timeout = timeout
     self.ftp = None
예제 #5
0
 def __init__(self, host='', user='', passwd='', acct='', keyfile=None,
              certfile=None, timeout=60):
     FTP_TLS.__init__(self, host, user, passwd, acct, keyfile, certfile,
                      timeout)