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

bridge: Fix crash on invalid cockpit.conf #21270

Merged
merged 2 commits into from
Nov 15, 2024

Conversation

martinpitt
Copy link
Member

If there is a syntax error in cockpit.conf, the bridge previously
crashed with e.g. a configparser.MissingSectionHeaderError.

Intercept that, log a warning instead, and ignore the config file
instead.

https://bugzilla.redhat.com/show_bug.cgi?id=2324979

jelly
jelly previously approved these changes Nov 14, 2024
@martinpitt
Copy link
Member Author

Ah, some error message noise, and the test_branding rename needs a pixel rename. Fixed.

All other test cases use testCamelCase.

Do the corresponding rename in the pixel refs.
If there is a syntax error in cockpit.conf, the bridge previously
crashed with e.g. a `configparser.MissingSectionHeaderError`.

Intercept that, log a warning instead, and ignore the config file
instead.

https://bugzilla.redhat.com/show_bug.cgi?id=2324979
@martinpitt
Copy link
Member Author

Ah, Python 3.13 gives better error messages. Fixed.

Copy link
Member

@jelly jelly left a comment

Choose a reason for hiding this comment

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

Thanks!

@martinpitt martinpitt merged commit b85d3fa into cockpit-project:main Nov 15, 2024
82 of 87 checks passed
@martinpitt martinpitt deleted the bridge-conf-crash branch November 15, 2024 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants