fix inheritance problem with mixin

- a mixin should not inherit from module then it has Parameters
- Parameters in mixins must be complete, not just overrides
- check precedence of read_<param> or handler

Change-Id: I72d9355a1982770d1a99d9552a20330103c97edb
This commit is contained in:
2021-03-18 13:32:54 +01:00
parent 6538500881
commit 48230334af
9 changed files with 55 additions and 24 deletions

View File

@ -495,9 +495,12 @@ class SecopClient(ProxyClient):
def _set_state(self, online, state=None):
# treat reconnecting as online!
state = state or self.state
self.callback(None, 'nodeStateChange', online, state)
for mname in self.modules:
self.callback(mname, 'nodeStateChange', online, state)
try:
self.callback(None, 'nodeStateChange', online, state)
for mname in self.modules:
self.callback(mname, 'nodeStateChange', online, state)
except Exception as e:
self.log.error('ERROR in nodeStateCallback %s', e)
# set online attribute after callbacks -> callback may check for old state
self.online = online
self.state = state