From 0d2e847c57540602ba1e9058c2801f9d0373fc3b Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Sun, 16 Apr 2017 16:03:06 +0200 Subject: [PATCH] tag_to_version.py: fix Python3 error (#7056) subprocess.communicate returns bytes instead of a str which is not the same for Python3. Therefore, we need to decode the bytes. --- Tools/tag_to_version.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Tools/tag_to_version.py b/Tools/tag_to_version.py index d09c104901..8f58c16bb6 100755 --- a/Tools/tag_to_version.py +++ b/Tools/tag_to_version.py @@ -12,6 +12,8 @@ p= subprocess.Popen( 'git describe --always --tags'.split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdout, stderr = p.communicate() +# Python3 needs this decode step. +stdout = stdout.decode('ascii') res = stdout.split('-')[0].split('.') major = res[0].replace('v','') minor = res[1]