From 92cc4bd4ffec42ec612523bd7e6e2deb32e73d02 Mon Sep 17 00:00:00 2001 From: Kp Date: Fri, 24 Aug 2018 02:58:21 +0000 Subject: [PATCH] Handle Python3 bytes vs. str in Git.__compute_extra_version --- SConstruct | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SConstruct b/SConstruct index bda3d9007..39c4f174d 100644 --- a/SConstruct +++ b/SConstruct @@ -196,10 +196,10 @@ class Git(StaticSubprocess): if g.returncode: return None _pcall = cls.pcall - return (g.out.split('\n')[0] + \ - ('*' if _pcall(['diff', '--quiet']).returncode else '') + \ - ('+' if _pcall(['diff', '--quiet', '--cached']).returncode else '') - ) + return (g.out.splitlines()[0] + \ + (b'*' if _pcall(['diff', '--quiet']).returncode else b'') + \ + (b'+' if _pcall(['diff', '--quiet', '--cached']).returncode else b'') + ).decode() class _ConfigureTests: class Collector(object):