From bb527b8d3f8181786751b0565f9a3d243193c3a1 Mon Sep 17 00:00:00 2001 From: gwen Date: Tue, 10 Sep 2024 16:15:28 +0200 Subject: [PATCH] exception --- src/rougail/user-data-environment/data.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/rougail/user-data-environment/data.py b/src/rougail/user-data-environment/data.py index 53dc163..c90dd12 100644 --- a/src/rougail/user-data-environment/data.py +++ b/src/rougail/user-data-environment/data.py @@ -73,8 +73,10 @@ class RougailUserDataEnvironment: # ValueError suivant le type # PropertyError -> hidden ou frozen... # pour les tests: mettre hidden à true dans le yaml +# try: self.load_environment(option) - +# except Exception as exc: +# print(exc) def load_environment(self, option): option_name = option.path() # the bash variable are in upper case @@ -98,4 +100,8 @@ class RougailUserDataEnvironment: 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) + try: + option.value.set(option_bash_value) + except Exception as exc: + print(exc) +