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']