From bfa6e096dcbaf0f9a8932c84ad29750e353ee308 Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Sat, 15 Apr 2017 21:37:00 +0200 Subject: [PATCH] tag_to_version.py: fix Python3 error 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 d09c10490142..8f58c16bb68a 100755 --- a/Tools/tag_to_version.py +++ b/Tools/tag_to_version.py @@ -12,6 +12,8 @@ '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]