Skip to content

Commit

Permalink
GUI.pyw: fixed a bug that caused the output to not be printed on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Elvish-Hunter committed Oct 20, 2015
1 parent 33bfaf5 commit 1a0d04d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions data/tools/GUI.pyw
Expand Up @@ -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:
Expand Down

0 comments on commit 1a0d04d

Please sign in to comment.