>From fb3108ebd6b350fcfe06392921c3d1e53f2a7e8e Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Fri, 2 Oct 2015 13:25:22 +0200 Subject: [PATCH] CONTRIB: pre-push hook could work with python3 p.communicate() return bytes on python3 --- contrib/git/pre-push | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/git/pre-push b/contrib/git/pre-push index d05202dfdd2f59a885b843e25e89878d985909e4..a3bb85ed257de7320fe65d9375edf59a134db3d8 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): -- 2.5.0