set secnode target to '' on disconnect

This commit is contained in:
2023-10-17 13:59:16 +02:00
parent 9e489d8cfd
commit 15cefee221

View File

@ -643,10 +643,14 @@ class FrappyNode(SecNodeDevice, Moveable):
self._cache.put(self, 'value', cfg)
self._setROParam('target', cfg)
def _disconnect(self):
super()._disconnect()
self.target = ''
def get_info(self):
result = self.doRead() or ''
code, text = self.status()
if not result and self.target and self._secnode:
if not result and self.target:
return '<disconnected>'
if code == status.OK or result == '':
return result