GUI.pyw: fixed a bug that caused the output to not be printed on Windows

This commit is contained in:
Elvish_Hunter 2015-10-20 10:53:06 +02:00
parent 33bfaf5ffc
commit 1a0d04d7b2

View file

@ -67,10 +67,10 @@ def run_tool(tool,queue,command):
si.dwFlags=subprocess.STARTF_USESHOWWINDOW|subprocess.SW_HIDE # to avoid showing a DOS prompt
try:
output=subprocess.check_output(' '.join(wrapped_line),stderr=subprocess.STDOUT,startupinfo=si,env=env)
queue.put_nowait(output)
queue.put_nowait(str(output, "utf8"))
except subprocess.CalledProcessError as error:
# post the precise message and the remaining output as a tuple
queue.put_nowait((tool,error.returncode,error.output))
queue.put_nowait((tool,error.returncode,str(error.output, "utf8")))
else: # STARTUPINFO is not available, nor needed, outside of Windows
queue.put_nowait(' '.join(command)+"\n")
try: