From d858435c3d81b9fc7c37e2917723a1486c1d5950 Mon Sep 17 00:00:00 2001 From: Marc Bonnici Date: Thu, 26 Jul 2018 11:26:04 +0100 Subject: utils/version: Fix check to only decode bytes When using Python3 the returned value of the commit is a byte string and therefore needs to be decoded. --- wa/framework/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wa/framework/version.py b/wa/framework/version.py index 2e1b8622..0dbb775c 100644 --- a/wa/framework/version.py +++ b/wa/framework/version.py @@ -46,7 +46,7 @@ def get_commit(): p.wait() if p.returncode: return None - if sys.version_info[0] == 3 and isinstance(std, str): + if sys.version_info[0] == 3 and isinstance(std, bytes): return std[:8].decode(sys.stdout.encoding) else: return std[:8] -- cgit v1.2.3