Allow arbitrary bytes in output. Resolves #245

This commit is contained in:
Anthony Sottile 2015-07-23 12:59:13 -07:00
parent 826aa4cebd
commit 66b1d39c6e
11 changed files with 104 additions and 50 deletions

View file

@ -102,8 +102,9 @@ def _run_single_hook(hook, repo, args, write, skips=frozenset()):
write('hookid: {0}\n'.format(hook['id']))
write('\n')
for output in (stdout, stderr):
assert type(output) is bytes, type(output)
if output.strip():
write(output.strip() + '\n')
write(output.strip() + b'\n')
write('\n')
return retcode