Exception handling for changed dict while loop in videv_base

This commit is contained in:
Dirk Alders 2023-06-11 09:40:01 +02:00
parent 2ec5487f00
commit ce85e1ca27

View File

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