From e02fcc0bd909d2106d0cdf3b1d075857adeb87eb Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Oct 06 2020 10:47:47 +0000 Subject: Encode the data passed onto the mail hook so it is of bytes type Fixes https://pagure.io/pagure/issue/4999 Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/hooks/mail.py b/pagure/hooks/mail.py index 989990b..bbb899e 100644 --- a/pagure/hooks/mail.py +++ b/pagure/hooks/mail.py @@ -128,7 +128,7 @@ class MailRunner(BaseRunner): proc = subprocess.Popen( [hook_file], cwd=repodir, stdin=subprocess.PIPE ) - proc.communicate(stdin) + proc.communicate(stdin.encode()) ecode = proc.wait() if ecode != 0: print("git_multimail failed")