# HG changeset patch # User Marcin Kuzminski # Date 2018-09-25 19:09:31 # Node ID 548d9d51da497ff169db1f4ef1b4bd80df6bdfd3 # Parent b05579578262236b81dd9120d6e01fc36e5ab6d0 hooks: handle errors before trying to fetch the output. diff --git a/vcsserver/hooks.py b/vcsserver/hooks.py --- a/vcsserver/hooks.py +++ b/vcsserver/hooks.py @@ -143,8 +143,9 @@ def _call_hook(hook_name, extras, writer log.debug('Hooks, using client:%s', hooks_client) result = hooks_client(hook_name, extras) log.debug('Hooks got result: %s', result) + + _handle_exception(result) writer.write(result['output']) - _handle_exception(result) return result['status']