Dispatcher: fix activate <module>
Change-Id: Ib97e69794cba97f2d1f6823f983ea64aaed00efa Reviewed-on: https://forge.frm2.tum.de/review/20250 Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de> Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de> Tested-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
This commit is contained in:
parent
c2b17a66b3
commit
08a92029a9
@ -331,13 +331,16 @@ class Dispatcher(object):
|
||||
if modulename not in self._export:
|
||||
raise NoSuchModuleError('Module does not exist on this SEC-Node!')
|
||||
moduleobj = self.get_module(modulename)
|
||||
if exportedname is not None:
|
||||
pname = moduleobj.accessiblename2attr.get(exportedname, True)
|
||||
if pname and pname not in moduleobj.accessibles:
|
||||
# what if we try to subscribe a command here ???
|
||||
raise NoSuchParameterError('Module has no such parameter on this SEC-Node!')
|
||||
modules = [(modulename, pname)]
|
||||
else:
|
||||
modules = [(modulename, None)]
|
||||
# activate only ONE item (module or module:parameter)
|
||||
self.subscribe(conn, specifier)
|
||||
modules = [(modulename, pname)]
|
||||
else:
|
||||
# activate all modules
|
||||
self._active_connections.add(conn)
|
||||
|
Loading…
x
Reference in New Issue
Block a user