From 83ac838339d15192642e07710156a7c537f18248 Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Fri, 2 Oct 2015 13:25:22 +0200 Subject: CONTRIB: pre-push hook could work with python3 p.communicate() return bytes on python3 Reviewed-by: Jakub Hrozek --- contrib/git/pre-push | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'contrib') diff --git a/contrib/git/pre-push b/contrib/git/pre-push index d05202dfd..a3bb85ed2 100755 --- a/contrib/git/pre-push +++ b/contrib/git/pre-push @@ -16,14 +16,14 @@ def get_all_commits(ref_from, ref_to): args = ['git', 'rev-list', '{:s}..{:s}'.format(ref_from, ref_to)] p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) out, err = p.communicate() - return [commit.strip() for commit in out.split('\n') if commit != ''] + return [commit.strip() for commit in out.decode('UTF-8').split('\n') if commit != ''] def commit_message(commit_hash): args = ['git', 'cat-file', 'commit', commit_hash] p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) out, err = p.communicate() - return out + return out.decode('UTF-8') def commit_has_rb(commit): -- cgit