修改ftp返回值
This commit is contained in:
@@ -88,17 +88,17 @@ class Order:
|
|||||||
sleep(5)
|
sleep(5)
|
||||||
fsize = os.path.getsize(linux_path + "/zmmtext123.txt") # 435814
|
fsize = os.path.getsize(linux_path + "/zmmtext123.txt") # 435814
|
||||||
if fsize == 435814:
|
if fsize == 435814:
|
||||||
return "Success"
|
return "ftp_success"
|
||||||
else:
|
else:
|
||||||
return "Fail"
|
return "ftp_fail"
|
||||||
elif ftp_type == "登录":
|
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'
|
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)
|
d = self.CMD(data)
|
||||||
# print(d)
|
# print(d)
|
||||||
if "Graphical (Xorg) program starter for ADRIANE" in d:
|
if "Graphical (Xorg) program starter for ADRIANE" in d:
|
||||||
return "Success"
|
return "ftp_success"
|
||||||
else:
|
else:
|
||||||
return "Fail"
|
return "ftp_fail"
|
||||||
# FTP 下载
|
# FTP 下载
|
||||||
def FTP_down(self, ftp_url,file_size,file_name):
|
def FTP_down(self, ftp_url,file_size,file_name):
|
||||||
windows_path = os.getcwd()
|
windows_path = os.getcwd()
|
||||||
|
|||||||
Reference in New Issue
Block a user