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

Update error handling for revocation scripts #162

Merged
merged 1 commit into from
Mar 3, 2021

Conversation

lkatalin
Copy link
Contributor

@lkatalin lkatalin commented Mar 2, 2021

A clippy error on #161 indicated better ways of handling errors on revocation scripts. I've made updates here that should make the code more readable and make clippy happy. Also, added a unit test for an error case in the revocation scripts.

Tl;dr the error handling now largely takes place in error.rs and in the run_revocation_actions() function, which just adds some context (of which script was running) to an Error::Execution to create an Error::Script. This makes the run_action() function much shorter and gets rid of some redundant boilerplate code.

@@ -0,0 +1,3 @@
{
"goodbye" : "there"
Copy link
Contributor

Choose a reason for hiding this comment

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

😆👍

@lkatalin lkatalin mentioned this pull request Mar 3, 2021
2 tasks
@ashcrow ashcrow merged commit 170d15e into keylime:master Mar 3, 2021
@lkatalin lkatalin deleted the fixclippy branch July 16, 2021 16:59
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.

4 participants