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