diff --git a/assets/configs/requirements.txt b/assets/configs/requirements.txt new file mode 100644 index 0000000..c68806c --- /dev/null +++ b/assets/configs/requirements.txt @@ -0,0 +1,3 @@ +loguru==0.7.2 +paramiko==3.5.0 +pymodbus==3.7.2 diff --git a/code/openapi.py b/code/openapi.py index e06e33a..4283830 100644 --- a/code/openapi.py +++ b/code/openapi.py @@ -600,7 +600,7 @@ class HmiRequest(object): @staticmethod def __package_xs(cmd): - return f"{dumps(cmd, separators=(",", ":"))}\r".encode() + return "".join([dumps(cmd, separators=(",", ":")), "\r"]).encode() def __unpackage(self, sock): def to_read(conn, mask): @@ -1757,7 +1757,7 @@ class HmiRequest(object): :return: None """ origin_code_list = self.get_filtered_error_code["g"]["log_code.data"]["code_list"] - # [{'id': 10000, 'title': 'HMI请求包解析错误'}, {'id': 10002, 'title': '快速调整启动失败'}] + # [{"id": 10000, "title": "HMI请求包解析错误"}, {"id": 10002, "title": "快速调整启动失败"}] if action == "clear": code_list = [] elif action == "add":