From 400c6ecf474b2af2518fdaf5e8ae5cd5689d653a Mon Sep 17 00:00:00 2001 From: Miro Hrončok Date: Oct 03 2020 20:48:10 +0000 Subject: post-receive-fedora-messaging: Don't attempt to decode unicode strings On Python 3, we can only decode byte sequences. subprocess.Popen(universal_newlines=True) always returns unicode stdout/sderr. Fixes https://pagure.io/fedora-infrastructure/issue/9366 Signed-off-by: Miro Hrončok --- diff --git a/roles/git/hooks/files/post-receive-fedora-messaging b/roles/git/hooks/files/post-receive-fedora-messaging index 1ee79e5..060b067 100644 --- a/roles/git/hooks/files/post-receive-fedora-messaging +++ b/roles/git/hooks/files/post-receive-fedora-messaging @@ -51,7 +51,7 @@ def revs_between(head, base): if proc.returncode != 0: raise IOError('git rev-list failed: %r, err: %r' % (stdout, stderr)) - for line in stdout.decode('utf-8').strip().split('\n'): + for line in stdout.strip().split('\n'): yield line.strip()