From 21158d09a3c1df2bd79cae34de11fca216eb995b Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Sat, 26 Mar 2016 12:45:03 +0100 Subject: [PATCH] Fix Python 3 compatibility on error This fixes a "TypeError: write() argument must eb str, not bytes" when the compilation command fails. --- hererocks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hererocks.py b/hererocks.py index 8bcb9e0..f270445 100755 --- a/hererocks.py +++ b/hererocks.py @@ -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))