aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Bonnici <marc.bonnici@arm.com>2018-07-26 11:26:04 +0100
committerMarc Bonnici <marc.bonnici@arm.com>2018-07-27 10:11:32 +0100
commitd858435c3d81b9fc7c37e2917723a1486c1d5950 (patch)
treecf680ce5dc5bbd45e129b613e107eb7d3eb0b91b
parentcaf805e8516c1f740c18f2bc195cc2a1b41318cd (diff)
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.
-rw-r--r--wa/framework/version.py2
1 files changed, 1 insertions, 1 deletions
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]