1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-02-21 04:18:58 +00:00

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.
This commit is contained in:
Marc Bonnici 2018-07-26 11:26:04 +01:00
parent caf805e851
commit d858435c3d

View File

@ -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]