summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2015-10-02 13:25:22 +0200
committerJakub Hrozek <jhrozek@redhat.com>2015-10-04 21:55:37 +0200
commit83ac838339d15192642e07710156a7c537f18248 (patch)
tree8f2ac522cddc35bbbc9a2d1593a75719b694c1c7 /contrib
parent26cac569adbae18a11af7f9845340ec9fc49685b (diff)
downloadsssd-83ac838339d15192642e07710156a7c537f18248.tar.gz
sssd-83ac838339d15192642e07710156a7c537f18248.tar.xz
sssd-83ac838339d15192642e07710156a7c537f18248.zip
CONTRIB: pre-push hook could work with python3
p.communicate() return bytes on python3 Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/git/pre-push4
1 files changed, 2 insertions, 2 deletions
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):