修复bug

This commit is contained in:
胡尧
2025-04-23 08:52:49 +08:00
parent bb3971c93e
commit c9ee0af25a
2 changed files with 12 additions and 1 deletions

View File

@@ -160,6 +160,8 @@ def transfer_nc_files(
source_ftp_info['username'],
source_ftp_info['password']
)
if not source_ftp.ftp:
raise Exception("编程文件FTP连接失败")
source_ftp.ftp.set_pasv(1)
# 连接目标FTP
@@ -169,6 +171,8 @@ def transfer_nc_files(
target_ftp_info['username'],
target_ftp_info['password']
)
if not source_ftp.ftp:
raise Exception("机床FTP连接失败")
source_ftp.ftp.set_pasv(1)
# 递归遍历源目录