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

Fix for extra whitespace in DnfRepositories fact entries #1087

Open
wants to merge 1 commit into
base: 2.x
Choose a base branch
from

Conversation

bbonf
Copy link

@bbonf bbonf commented Apr 22, 2024

On a clean RHEL 9.3 install, pyinfra.facts.dnf.DnfRepositores doesn't work as expected because there are extra spaces appended to dictionary keys, and prepanded to values.

That's because the parsing code splits on '=' but doesn't handle whitespace.

Also relevant for the 3.x branch

@Fizzadar
Copy link
Member

GH seems to be confused (as usual) and is throwing a total nonsense error for this PR only despite no changes in that area.

Copy link
Member

@Fizzadar Fizzadar left a comment

Choose a reason for hiding this comment

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

Thank you for fixing this @bbonf! Do you have an example repo line by any chance? Would be great to get a test added.

@bbonf
Copy link
Author

bbonf commented May 13, 2024

Sure, here's an excerpt from one file:

[rhel-atomic-7-cdk-3.6-source-rpms]
name = Red Hat Container Development Kit 3.6 /(Source RPMs)

And here's another (which is parsed correctly without this change):

[epel]
name=epel

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.

None yet

2 participants