diff --git a/avocado/core/settings.py b/avocado/core/settings.py index 46b2ebb894..7be0fe7ad0 100644 --- a/avocado/core/settings.py +++ b/avocado/core/settings.py @@ -222,7 +222,10 @@ def _as_list(value): return [] if isinstance(value, str): - return ast.literal_eval(value) + try: + return ast.literal_eval(value) + except SyntaxError: + pass if isinstance(value, list): return value @@ -628,7 +631,7 @@ def merge_with_configs(self): value = value[0] try: self.update_option(namespace, value, convert=True) - except SyntaxError: + except (SyntaxError, ValueError): raise SyntaxError( f"Syntax error in config file {path}, please check the value {value} " )