-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
hook: switch to using check_call #3409
Conversation
Seems right to me! Maybe we should also catch CalledProcessError and print a friendly message when the hook fails? |
Aha, good catch! I clearly didn't look into the |
f566b34
to
532c3da
Compare
532c3da
to
7256c1d
Compare
7256c1d
to
cf7a04e
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.
Nice; this looks perfect to me! Thanks for adding tests!
TBH, this might address 90% of the real-world utility of #2835. As you noted in that thread, it's not entirely clear how we'd actually go about implementing on_error
as proposed. Actions like skip_album
would only even make sense for a subset of events, and even then, the infrastructure is not set up yet to let events communicate such signals back to the import pipeline.
So I think it might be best to merge this (with a changelog entry!) now and leave any consideration of user-defined error handling for another day.
Thank you again for addressing this!
I've gotten half way through implementing support for I'll go ahead and update the changelog (I always seem to forget this step!). |
hook: switch to using check_call
Perfect; thanks! I merged this as is. That's cool; thanks for looking into |
A small change but hopefully part of a larger piece of work around #2835.