修改ftp返回值

This commit is contained in:
朱明明
2020-04-16 18:15:41 +08:00
parent fcb17b92c5
commit 756106a5c8

View File

@@ -88,17 +88,17 @@ class Order:
sleep(5)
fsize = os.path.getsize(linux_path + "/zmmtext123.txt") # 435814
if fsize == 435814:
return "Success"
return "ftp_success"
else:
return "Fail"
return "ftp_fail"
elif ftp_type == "登录":
data = 'curl -m 10 ftp://202.38.97.230/pub/iso/linux/knoppix/KNOPPIX_V7.7.1DVD-2016-10-22-EN/dpkg-l-dvd-771.txt -u"anonymous:chrome@example.com" | iconv -f utf-8 -t gbk'
d = self.CMD(data)
# print(d)
if "Graphical (Xorg) program starter for ADRIANE" in d:
return "Success"
return "ftp_success"
else:
return "Fail"
return "ftp_fail"
# FTP 下载
def FTP_down(self, ftp_url,file_size,file_name):
windows_path = os.getcwd()