Use a `subprocess` exception here. I believe, `CalledProcessError` in this case.