From 4bde91d16be8a4489e7a85febaffc00cd6005b81 Mon Sep 17 00:00:00 2001 From: Markus Zolliker Date: Mon, 17 Jun 2024 15:18:40 +0200 Subject: [PATCH] no warning 'does not match target' while restarting --- devices.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/devices.py b/devices.py index a78b651..f7311e5 100644 --- a/devices.py +++ b/devices.py @@ -166,7 +166,7 @@ class FrappyConfig(Device): while not self._shutdown_event.wait(1): busy = session.daemon_device._controller.status >= 0 if self._restarting or (busy and cnt < 10): - # do not check when restarting and check only every 10 sec when busy + # do not check while restarting and check only every 10 sec when busy cnt += 1 continue if not busy and self._back_to_normal: @@ -739,7 +739,8 @@ class FrappyNode(SecNodeDevice, Moveable): if self._cfgvalue is None: running_cfg = FrappyManager().get_cfg(config.instrument, self.service) if running_cfg: - if running_cfg != self.target: + fc = session.devices.get('frappy') + if running_cfg != self.target and fc and not fc._restarting: self.log.warning(f'server info {running_cfg!r} does not match target cfg {self.target!r}') self._cfgvalue = running_cfg else: