Fix gpg.verify
with python-gnupg >= 0.5.1
#67095
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes signature validity reporting with
python-gnupg >=0.5.1
, where the reported levels are off by -1 (changed in vsajip/python-gnupg#205). Thus also fixes a crash with the highest level, which would throw aKeyError
.Note: This issue is found in 3006.9 as well, but not as relevant since the pinned version there is
0.4.8
. The code has changed a lot between both versions, which is why I opted to submit this for 3007+ only.What issues does this PR fix or reference?
Fixes: #66685
Previous Behavior
New Behavior
Works as expected/reports correct levels
Merge requirements satisfied?
[NOTICE] Bug fixes or features added to Salt require tests.
Commits signed with GPG?
Yes