From d646d2df8494d0482427f3b41159f1276075e648 Mon Sep 17 00:00:00 2001 From: Chris Billows <152496175+chrisbillowsMO@users.noreply.github.com> Date: Thu, 23 May 2024 15:17:38 +0100 Subject: [PATCH] #3392: Improve user messages. --- .../recipe_test_workflow/app/configure/bin/configure.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/configure/bin/configure.py b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/configure/bin/configure.py index c01378faf3..862b3d4319 100755 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/configure/bin/configure.py +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/configure/bin/configure.py @@ -101,7 +101,10 @@ def validate_user_config_file(user_config_file_content): ValidationError If any of the called validation functions raise a ValidationError. """ - errors = [] + errors = [ + "There were validation errors in your user configuration file. See " + "details below." + ] for user_config_key, usr_config_value in user_config_file_content.items(): try: validatation_function = _validators[user_config_key] @@ -120,8 +123,8 @@ def validate_user_config_file(user_config_file_content): f'Validation error for {user_config_key.upper()} with ' f'value "{usr_config_value}"\nERROR: {err}\n') if errors: - print(errors) raise ValidationError("\n".join(errors)) + print("All validation checks passed.") def write_yaml(file_path, contents):