Skip to content

Commit

Permalink
BUGFIX: Don't let ccc process block if the error message is long, fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kiij committed May 9, 2014
1 parent 3b1cc10 commit 162dee0
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions coilsnake/ui/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
import os
from shutil import copyfile
import time
from subprocess import Popen, PIPE, STDOUT
from subprocess import Popen, PIPE
import sys

from CCScriptWriter.CCScriptWriter import CCScriptWriter

Expand Down Expand Up @@ -105,15 +106,14 @@ def compile_project(project_path, base_rom_filename, output_rom_filename, ccscri
"--summary", os.path.join(project_path, "ccscript", "summary.txt")]
+ script_filenames,
stdout=PIPE,
stderr=STDOUT,
shell=False) # Having this be "True" causes CCScript to open a command prompt window, but can cause
# freezes on Windows
process.wait()
stderr=PIPE,
shell=(sys.platform == 'win32'))

cccStdin, cccStderr = process.communicate()
if process.returncode == 0:
log.info("CCScript compiler finished successfully")
else:
log.error("CCScript compiler failed with the following message:")
log.error(process.stdout.read())
log.error("CCScript compiler failed with the following message:\n" + cccStderr)
raise CoilSnakeError("CCScript compilation failed")

rom = Rom()
Expand Down

0 comments on commit 162dee0

Please sign in to comment.