mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-11-03 20:05:49 +01:00
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:
@@ -453,7 +453,7 @@ def check_output(prog):
|
|||||||
if retcode:
|
if retcode:
|
||||||
return ""
|
return ""
|
||||||
try:
|
try:
|
||||||
return output.decode()
|
return str(output.decode('utf8'))
|
||||||
except UnicodeError:
|
except UnicodeError:
|
||||||
logging.debug("Exception on decode: %s" % (traceback.format_exc(),))
|
logging.debug("Exception on decode: %s" % (traceback.format_exc(),))
|
||||||
return ""
|
return ""
|
||||||
|
|||||||
Reference in New Issue
Block a user