buildcommands: Use regular str() types for input on Python2

Avoid using unicode() types on Python2 as it can lead to subtle
errors.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2021-10-31 13:45:37 -04:00
parent ccee189f99
commit dd98884bb4
1 changed files with 1 additions and 1 deletions

View File

@ -453,7 +453,7 @@ def check_output(prog):
if retcode:
return ""
try:
return output.decode()
return str(output.decode('utf8'))
except UnicodeError:
logging.debug("Exception on decode: %s" % (traceback.format_exc(),))
return ""