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

Issue 29: on_fail action for Mode activation #182

Merged
merged 23 commits into from
Jan 26, 2024
Merged

Conversation

fohrloop
Copy link
Owner

Closes: #29

The modes now receive a on_fail argument:

with keep.running(on_fail="warn"):
    ...

The on fail can either a string or a callable.

"error" (raise wakepy.ActivationError) -- default
"warn" (warnings.warn)
"pass" (do nothing)
callable (custom callable, which takes single argument: ActivationResult)

@fohrloop fohrloop merged commit 985b778 into dev Jan 26, 2024
@fohrloop fohrloop deleted the issue29-on-fail-action branch January 26, 2024 22:15
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.

Make it possible to select what happens with errors
1 participant