浏览代码

Exception handling for changed dict while loop in videv_base

tags/v1.3.0
Dirk Alders 1年前
父节点
当前提交
ce85e1ca27
共有 1 个文件被更改,包括 6 次插入3 次删除
  1. 6
    3
      base.py

+ 6
- 3
base.py 查看文件

@@ -65,9 +65,12 @@ class videv_base(mqtt_base):
65 65
         self.__periodic__.run()
66 66
 
67 67
     def send_all(self, rt):
68
-        for key in self:
69
-            if self[key] is not None:
70
-                self.__tx__(key, self[key])
68
+        try:
69
+            for key in self:
70
+                if self[key] is not None:
71
+                    self.__tx__(key, self[key])
72
+        except RuntimeError:
73
+            self.logger.warning("Runtimeerror while sending cyclic videv information. This may happen on startup.")
71 74
 
72 75
     def add_display(self, my_key, ext_device, ext_key, on_change_only=True):
73 76
         """

正在加载...
取消
保存