make it run again

This commit is contained in:
gwen 2024-09-10 11:21:41 +02:00
parent ed2e66320e
commit f315137936

View file

@ -68,17 +68,17 @@ class RougailUserDataEnvironment:
self.parse(option)
else:
# try except
# ValueError suivant le type
# PropertyError -> hidden ou frozen...
# ValueError suivant le type
# PropertyError -> hidden ou frozen...
# test: mettre hidden à true dans le yaml
self.load_environment(option)
def load_environment(self, option):
# FIXME : mettre un .upper()
# pour que les var de env soient en maj
# pour que les var de env soient en maj
option_name = option.path()
# this is used only for warning purposes
if option_name not in unused_environment_var:
if option_name not in self.unused_environment_var:
return
# the rougail type is not the tiramisu type
# tiramisu type is option.type
@ -90,15 +90,15 @@ class RougailUserDataEnvironment:
type_obj = CONVERT_OPTION.get(option_type, {}).get("func")
self.unused_environment_var.remove(option_name)
# let's parse the environment variables values
# FIXME enlever les deux fonction de helper
# FIXME option_bash_value = self.unused_environment_var.pop(option_name
# FIXME enlever les deux fonction de helper
# FIXME option_bash_value = self.unused_environment_var.pop(option_name
option_bash_value = get_rougail_environment_dict()[option_name]
if ismulti:
# here we expect the bash option value of a multi to be coma separated:
# FIXME faire un strip() la dessus
option_bash_value = option_bash_value.split(",")
if type_obj:
option_bash_value = [type_obj(opt) for opt in option_value]
option_bash_value = [type_obj(opt) for opt in option_bash_value]
elif type_obj:
option_bash_value = type_obj(option_bash_value)
option.value.set(option_bash_value)