Skip to content

Commit dd98884

Browse files
committedOct 31, 2021
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>
1 parent ccee189 commit dd98884

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎scripts/buildcommands.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ def check_output(prog):
453453
if retcode:
454454
return ""
455455
try:
456-
return output.decode()
456+
return str(output.decode('utf8'))
457457
except UnicodeError:
458458
logging.debug("Exception on decode: %s" % (traceback.format_exc(),))
459459
return ""

0 commit comments

Comments
 (0)