refactoring
This commit is contained in:
parent
cfd32c222d
commit
eaf139147a
1 changed files with 7 additions and 12 deletions
|
@ -83,18 +83,13 @@ class RougailUserDataEnvironment:
|
||||||
if option_name in unused_environment_var:
|
if option_name in unused_environment_var:
|
||||||
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
|
||||||
|
option_bash_value = get_rougail_environment_dict()[option_name]
|
||||||
if ismulti:
|
if ismulti:
|
||||||
option_bash_value = get_rougail_environment_dict()[option_name]
|
|
||||||
# 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:
|
||||||
option_value = option_bash_value.split(",")
|
# FIXME faire un strip() la dessus
|
||||||
|
option_bash_value = option_bash_value.split(",")
|
||||||
if type_obj is not None:
|
if type_obj is not None:
|
||||||
option_value_typed = [type_obj(opt) for opt in option_value]
|
option_bash_value = [type_obj(opt) for opt in option_value]
|
||||||
option.value.set(option_value_typed)
|
if type_obj:
|
||||||
else:
|
option_bash_value = type_obj(option_bash_value)
|
||||||
option.value.set(option_value)
|
option.value.set(option_bash_value)
|
||||||
else:
|
|
||||||
option_bash_value = get_rougail_environment_dict()[option_name]
|
|
||||||
if type_obj is not None:
|
|
||||||
option.value.set(type_obj(option_bash_value))
|
|
||||||
else:
|
|
||||||
option.value.set(option_bash_value)
|
|
||||||
|
|
Loading…
Reference in a new issue