FrappyNode.target must be set before restarting servers

This commit is contained in:
2024-05-29 15:06:19 +02:00
parent 6e4c53c881
commit 1a82818da4

View File

@ -787,9 +787,10 @@ class FrappyNode(SecNodeDevice, Moveable):
""" """
if cfg is None: if cfg is None:
cfg = self._cfgvalue cfg = self._cfgvalue
if cfg is None: if cfg is None:
self.log.error('can not restart - previous cfg unknown') self.log.error('can not restart - previous cfg unknown')
return return
self._setROParam('target', cfg)
ins = config.instrument ins = config.instrument
fm = FrappyManager() fm = FrappyManager()
info = fm.get_ins_info(ins) info = fm.get_ins_info(ins)
@ -829,7 +830,6 @@ class FrappyNode(SecNodeDevice, Moveable):
self._cfgvalue = cfg self._cfgvalue = cfg
if self._cache: if self._cache:
self._cache.put(self, 'value', cfg) self._cache.put(self, 'value', cfg)
self._setROParam('target', cfg)
finally: finally:
self._cache.put(self, 'previous_config', self._cfgvalue or self.uri) self._cache.put(self, 'previous_config', self._cfgvalue or self.uri)