Commit 117ab001 by 刘豪

update

parent 389fb0e9
Showing with 13 additions and 6 deletions
......@@ -244,18 +244,25 @@ def remove_file(extract_dir):
remove(conf_environment["tmp_file_path"] + local_file_name_3)
def run():
if not os.path.exists(conf_environment["tmp_file_path"]):
os.makedirs(conf_environment["tmp_file_path"])
extract_dir = conf_environment["tmp_file_path"] + "extract/"
if not os.path.exists(extract_dir):
os.makedirs(extract_dir)
# ftp_client = ftp.FTPUtil(host=conf_environment["ftp"]["host"],
# port=conf_environment["ftp"]["port"],
# passive=True,
# username=conf_environment["ftp"]["username"],
# password=conf_environment["ftp"]["password"],
# logger = logger)
# down_cn(ftp_client, extract_dir)
ftp_client = ftp.FTPUtil(host=conf_environment["ftp"]["host"],
port=conf_environment["ftp"]["port"],
passive=True,
username=conf_environment["ftp"]["username"],
password=conf_environment["ftp"]["password"],
logger = logger)
if not os.path.exists(conf_environment["tmp_file_path"]):
os.makedirs(conf_environment["tmp_file_path"])
extract_dir = conf_environment["tmp_file_path"] + "extract/"
if not os.path.exists(extract_dir):
os.makedirs(extract_dir)
down_cn(ftp_client, extract_dir)
down_hk(ftp_client, extract_dir)
remove_file(extract_dir)
logger.info("运行完成")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment