Fix Python 3 compatibility on error

This fixes a "TypeError: write() argument must eb str, not bytes" when
the compilation command fails.
This commit is contained in:
Peter Wu 2016-03-26 12:45:03 +01:00
parent 528e8c2be7
commit 21158d09a3

View File

@ -93,7 +93,7 @@ def exec_command(capture, *args):
return ""
if not live_output:
sys.stdout.write(exception.output)
sys.stdout.write(exception.output.decode("UTF-8"))
sys.exit("Error: got exitcode {} from command {}".format(
exception.returncode, command))