set secnode target to '' on disconnect
This commit is contained in:
@ -643,10 +643,14 @@ class FrappyNode(SecNodeDevice, Moveable):
|
|||||||
self._cache.put(self, 'value', cfg)
|
self._cache.put(self, 'value', cfg)
|
||||||
self._setROParam('target', cfg)
|
self._setROParam('target', cfg)
|
||||||
|
|
||||||
|
def _disconnect(self):
|
||||||
|
super()._disconnect()
|
||||||
|
self.target = ''
|
||||||
|
|
||||||
def get_info(self):
|
def get_info(self):
|
||||||
result = self.doRead() or ''
|
result = self.doRead() or ''
|
||||||
code, text = self.status()
|
code, text = self.status()
|
||||||
if not result and self.target and self._secnode:
|
if not result and self.target:
|
||||||
return '<disconnected>'
|
return '<disconnected>'
|
||||||
if code == status.OK or result == '':
|
if code == status.OK or result == '':
|
||||||
return result
|
return result
|
||||||
|
Reference in New Issue
Block a user