-
Notifications
You must be signed in to change notification settings - Fork 196
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
Replace the call to hawkey with a call to DNF in repo sanity check #3198
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sweet - looks good! I will squash and then let mergify do its thing. Thanks so much!
dd253d0
to
5b8f4f3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much!
The latest change adds the one missing line of diff cover, and fixes some flake8 errors. |
libdnf/hawkey silently dropped the API we were using to do repo sanity checks. So instead, let's just shell out to DNF and make it their problem. Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
Had forgotten to run flake8 over the test :). |
dnf_args (list): A list of arguments after DNF is set up to use the repo under test. | ||
Example would be ["search", "kernel"] or ["module", "list"]. | ||
Raises: | ||
Exception: If the repodata is not valid or does not exist. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, function is returning CalledProcessError
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now that's the only option, yes. But I have plans to add more checks, which might return other exceptions.
And the current docblock is technically correct:
>>> issubclass(subprocess.CalledProcessError, Exception)
True
This patch is planned for inclusion in the upcoming 4.0.0 release: #3221 |
Bodhi 4.0.0 beta is built and deployed to staging: https://copr.fedorainfracloud.org/coprs/bowlofeggs/bodhi-pre-release |
libdnf/hawkey silently dropped the API we were using to do repo sanity checks.
So instead, let's just shell out to DNF and make it their problem.
Signed-off-by: Patrick Uiterwijk patrick@puiterwijk.org