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:
parent
ccee189f99
commit
dd98884bb4
|
@ -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 ""
|
||||
|
|
Loading…
Reference in New Issue