HomeSoftware Heritage

post-receive hook: fix an exception when the command fails with an error

Description

post-receive hook: fix an exception when the command fails with an error

Problem:

  1. self.proto.write_sideband is expecting "bytes", but was getting a "str".
  2. HookError(x) expects a string for a nicer output.

Solution:
Pass a str to HookError (decode the command output),
and then pass bytes to write_sideband (encode it).

Details

Provenance
battlmonstr <battlmonstr@users.noreply.github.com>Authored on Mar 13 2021, 7:06 PM
ardumontPushed on Sep 27 2021, 5:34 PM
Parents
rPPDWbf1b5454cb13: Merge branch 'stash-no-verify' of git://github.com/pmrowla/dulwich
Branches
Unknown
Tags
Unknown

Event Timeline