mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-31 02:01:16 +00:00
utils/version: do not decode bytes
Check that the resulting output inside get_commit() is a str before attempting to decode it when running on Python 3.
This commit is contained in:
parent
86dcfbf595
commit
e485b9ed39
@ -46,7 +46,7 @@ def get_commit():
|
||||
p.wait()
|
||||
if p.returncode:
|
||||
return None
|
||||
if sys.version_info[0] == 3:
|
||||
if sys.version_info[0] == 3 and isinstance(std, str):
|
||||
return std[:8].decode(sys.stdout.encoding)
|
||||
else:
|
||||
return std[:8]
|
||||
|
Loading…
x
Reference in New Issue
Block a user