wu98hay 1 年之前
父节点
当前提交
e249a54998
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      device/machinery_service.py

+ 3 - 0
device/machinery_service.py

@@ -29,6 +29,9 @@ def lora_db():
             for machinery in machinery_all:
                 msg = "0103000A0002E409"
                 rs = lora_util.send_msg_back(msg, inter, 1)
+                if rs is None:
+                    my_log.error("通讯失败")
+                    continue
                 res = parser_data(rs)
                 machinery_code = machinery['machinery_code']
                 machinery_name = machinery['machinery_name']