Skip to content

Commit

Permalink
Switch to using check_call for hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
jackwilsdon authored and Jack Wilsdon committed Oct 17, 2019
1 parent 4d55e6d commit 648f230
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion beetsplug/hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ def hook_function(**kwargs):
u' '.join(command_pieces), event)

try:
subprocess.Popen(command_pieces).wait()
subprocess.check_call(command_pieces)
except subprocess.CalledProcessError as exc:
self._log.error(u'hook for {0} exited with status {1}', event, exc.returncode)
except OSError as exc:
self._log.error(u'hook for {0} failed: {1}', event, exc)

Expand Down

0 comments on commit 648f230

Please sign in to comment.