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
sampsyo
left a comment
There was a problem hiding this comment.
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.