convert path for DynOptionDescription to valid path

This commit is contained in:
Emmanuel Garette 2019-12-22 08:38:08 +01:00
parent f062d9f30a
commit f19a427f46

View file

@ -21,9 +21,16 @@ from .i18n import _
from .xmlreflector import HIGH_COMPATIBILITY from .xmlreflector import HIGH_COMPATIBILITY
#from . import eosfunc #from . import eosfunc
from .objspace import CreoleObjSpace from .objspace import CreoleObjSpace
from .utils import normalize_family
import imp import imp
class ConvertDynOptionDescription(DynOptionDescription):
def convert_suffix_to_path(self, suffix):
return normalize_family(suffix,
check=False)
class CreoleLoaderError(Exception): class CreoleLoaderError(Exception):
pass pass
@ -539,7 +546,7 @@ class Family(Common):
del self.attrib['dynamic'] del self.attrib['dynamic']
self.attrib['suffixes'] = Calculation(self.eosfunc.calc_value, self.attrib['suffixes'] = Calculation(self.eosfunc.calc_value,
Params((ParamOption(dynamic),))) Params((ParamOption(dynamic),)))
option = DynOptionDescription(**self.attrib) option = ConvertDynOptionDescription(**self.attrib)
elif not self.is_leader: elif not self.is_leader:
option = OptionDescription(**self.attrib) option = OptionDescription(**self.attrib)
else: else: