Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better description of config syntax error #5985

Merged
merged 1 commit into from
Jul 31, 2024

Conversation

richtja
Copy link
Contributor

@richtja richtja commented Jul 11, 2024

When there is an issue with syntax in avocado config file avocado won't provide enough information for the user to understand the problem. This commit will improve the error message by specifying the wrong value and the reason for syntax error.

before this commit:

SyntaxError: Syntax error in config file ./pom_config, please check the
value /build/avocado/data/cache

after this commit:

ValueError: /build/avocado/data/cache could not be converted into a list
During handling of the above exception, another exception occurred:

SyntaxError: Syntax error in config file ./pom_config, please check the
value /build/avocado/data/cache

Reference: #5906

When there is an issue with syntax in avocado config file avocado won't
provide enough information for the user to understand the problem. This
commit will improve the error message by specifying the wrong value and
the reason for syntax error.

before this commit:
```
SyntaxError: Syntax error in config file ./pom_config, please check the
value /build/avocado/data/cache
```

after this commit:
```
ValueError: /build/avocado/data/cache could not be converted into a list
During handling of the above exception, another exception occurred:

SyntaxError: Syntax error in config file ./pom_config, please check the
value /build/avocado/data/cache
```

Reference: avocado-framework#5906
Signed-off-by: Jan Richter <[email protected]>
@richtja
Copy link
Contributor Author

richtja commented Jul 30, 2024

Hi @harvey0100 and @clebergnu, gentle ping here.

Copy link
Contributor

@clebergnu clebergnu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@richtja richtja merged commit 698e9d3 into avocado-framework:master Jul 31, 2024
58 checks passed
@richtja richtja deleted the settings_exception_fix branch August 20, 2024 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done 107
Development

Successfully merging this pull request may close these issues.

Issues converting cache_dirs configuration option as list in _avocado/core/settings.py _as_list(value) method
3 participants