all: rename parameters to accessibles in module classes
+ make accesses to <module>.parameters work again Change-Id: I91c09b0f9f5f28d78cd644f83a96c8772e5977e5 Reviewed-on: https://forge.frm2.tum.de/review/20249 Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de> Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch> Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de> Tested-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
This commit is contained in:
@ -206,5 +206,10 @@ class ModuleMeta(type):
|
||||
if attrname[3:] not in newtype.accessibles:
|
||||
raise ProgrammingError('%r: command %r has to be specified '
|
||||
'explicitly!' % (name, attrname[3:]))
|
||||
|
||||
# provide properties to 'filter' out the parameters/commands
|
||||
newtype.parameters = dict((k,v) for k,v in newtype.accessibles.items() if isinstance(v, Parameter))
|
||||
newtype.commands = dict((k,v) for k,v in newtype.accessibles.items() if isinstance(v, Command))
|
||||
|
||||
attrs['__constructed__'] = True
|
||||
return newtype
|
||||
|
Reference in New Issue
Block a user