w2tgit add .!
This commit is contained in:
@ -9,7 +9,7 @@ def traversal_files(_path, _w2t):
|
||||
# 参数:路径
|
||||
# 返回值:路径下的文件夹列表 路径下的文件列表
|
||||
if not os.path.exists(_path):
|
||||
_w2t(f"数据文件夹{_path}不存在,请确认后重试......", "red", "PathNotExistError")
|
||||
_w2t(f"数据文件夹{_path}不存在,请确认后重试......\n", "red", "PathNotExistError")
|
||||
else:
|
||||
dirs, files = [], []
|
||||
for item in os.scandir(_path):
|
||||
|
@ -746,7 +746,7 @@ class HmiRequest(object):
|
||||
req = json.load(f_json)
|
||||
except Exception as Err:
|
||||
clibs.insert_logdb("ERROR", "openapi", f"hr-execution: 暂不支持 {command} 功能,或确认该功能存在... {Err}")
|
||||
clibs.w2t(f"hr-execution: 暂不支持 {command} 功能,或确认该功能存在... {Err}", "red", "CommandError")
|
||||
clibs.w2t(f"hr-execution: 暂不支持 {command} 功能,或确认该功能存在... {Err}\n", "red", "CommandError")
|
||||
|
||||
if p_flag == 0: # for old protocols
|
||||
match command:
|
||||
@ -2155,7 +2155,7 @@ class PreDos(object):
|
||||
self.__ssh.connect(hostname=self.ip, port=self.port, username=self.username, password=self.password)
|
||||
self.__sftp = self.__ssh.open_sftp()
|
||||
except Exception as Err:
|
||||
msg = f"predos: SSH 无法连接到 {self.ip}:{self.port},需检查网络连通性或者登录信息是否正确 {Err}"
|
||||
msg = f"predos: SSH 无法连接到 {self.ip}:{self.port},需检查网络连通性或者登录信息是否正确 {Err}\n"
|
||||
clibs.insert_logdb("ERROR", "openapi", msg)
|
||||
clibs.w2t(msg, "red", f"SSHError: cannot connected to {self.ip}:{self.port}")
|
||||
|
||||
|
Reference in New Issue
Block a user