configurables: switch from list to dict
Change-Id: I2e13703ca7ee928aec15b99e81120d003e88c839 Reviewed-on: https://forge.frm2.tum.de/review/20917 Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de> Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
This commit is contained in:
parent
f6d8f823d9
commit
41cf96f450
@ -192,13 +192,14 @@ class ModuleMeta(PropertyMeta):
|
|||||||
def configurables(cls):
|
def configurables(cls):
|
||||||
# note: this ends up as an property of the Module class (not on the instance)!
|
# note: this ends up as an property of the Module class (not on the instance)!
|
||||||
|
|
||||||
# list of tuples (cfg-file key, Property/Parameter)
|
# dict of properties with Property and Parameter with dict of properties
|
||||||
res = []
|
res = {}
|
||||||
# collect info about properties
|
# collect info about properties
|
||||||
for pn, pv in cls.properties.items():
|
for pn, pv in cls.properties.items():
|
||||||
res.append((u'%s' % pn, pv,))
|
res[pn] = pv
|
||||||
# collect info about parameters and their properties
|
# collect info about parameters and their properties
|
||||||
for param, pobj in cls.accessibles.items():
|
for param, pobj in cls.accessibles.items():
|
||||||
|
res[param] = {}
|
||||||
for pn, pv in pobj.__class__.properties.items():
|
for pn, pv in pobj.__class__.properties.items():
|
||||||
res.append((u'%s.%s' % (param,pn), pv))
|
res[param][pn] = pv
|
||||||
return res
|
return res
|
||||||
|
Loading…
x
Reference in New Issue
Block a user