module: apply datatype first
if the default value is given before the datatype, the module cannot be created. Also fixes the remaining errors in issue 4913. Fixes: 4913 Change-Id: I613576388bc3b9e7a5cdc7aa4d5ea73e549ae167 Reviewed-on: https://forge.frm2.tum.de/review/c/secop/frappy/+/37182 Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de> Reviewed-by: Alexander Zaft <a.zaft@fz-juelich.de> Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
This commit is contained in:
@@ -449,6 +449,10 @@ class Module(HasAccessibles):
|
||||
self.commands[name] = accessible
|
||||
if cfg is not None:
|
||||
try:
|
||||
# apply datatype first
|
||||
datatype = cfg.pop('datatype', None)
|
||||
if datatype is not None:
|
||||
accessible.setProperty('datatype', datatype)
|
||||
for propname, propvalue in cfg.items():
|
||||
if propname in {'value', 'default', 'constant'}:
|
||||
# these properties have ValueType(), but should be checked for datatype
|
||||
|
||||
Reference in New Issue
Block a user