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