-
Bug
-
Resolution: Done
-
Medium
-
None
The BACI Properties are a feature offered by CharacteristicComponents, however currently when using inheritance to have a specialization of an existing CharacteristicComponent, the BACI properties from the parent(s) are missed.
Two patches were proposed by the ACS community:
< if prop_type == "":
|
< # Retrieve the property type from the module information < newmod = __import__(modarray[1], globals(), locals(), modarray[2]) < prop_ifr_name = newmod.__dict__[modarray[2]].__dict__['_d__get_'+prop_name][1][0][1]
|
< prop_type =
|
newmod.__dict__[modarray[2]].__dict__['_d__get_'+prop_name][1][0][2]
|
|
> if prop_type == "":
|
> try:
|
> # Retrieve the property type from the module information > newmod = __import__(modarray[1], globals(), locals(),
|
modarray[2])
|
> component = getattr(newmod, modarray[2]) > attribute = getattr(component, '_d__get_%s' % prop_name) > prop_ifr_name = attribute[1][0][1] > prop_type = attribute[1][0][2] > except AttributeError as ex:
|
> raise CannotGetComponentExImpl( > 'The type of the property `%s` cannot be determined'
|
> % prop_name )
|
And:
--- BaciHelper.py.orig 2019-11-28 17:34:04.868708185 +0000
|
+++ BaciHelper.py 2019-11-28 17:34:31.559663389 +0000
|
@@ -198,7 +198,7 @@
|
|
#must handle user defined enums as well
|
elif prop_type.startswith("RO") or prop_type.startswith("RW"):
|
- prop_class = getEnumClass(prop_ifr_name)
|
+ prop_class = getEnumClass(prop_type)
|
|
else:
|
msg = "The '" + str(prop_name) + "' property of type '"
|
We need to evaluate the proposals and check the best solution for the reported problem.