sf1.0
This commit is contained in:
@@ -15,7 +15,7 @@ class FtpController():
|
||||
|
||||
ftp = FTP()
|
||||
|
||||
def __init__(self, host="192.168.50.202", port=21, username="ftpuser", password="123456"):
|
||||
def __init__(self, host, port, username, password):
|
||||
try:
|
||||
self.ftp.connect(host, port)
|
||||
self.ftp.login(username, password)
|
||||
@@ -34,7 +34,7 @@ class FtpController():
|
||||
if file.find(".") != -1:
|
||||
self.download_file(server, file)
|
||||
else:
|
||||
return
|
||||
return False
|
||||
|
||||
# 下载指定目录下的指定文件
|
||||
def download_file(self, serverfile, remotefile):
|
||||
|
||||
Reference in New Issue
Block a user