Skip to content
Permalink
Browse files

Merge pull request #8557 from juanmpd/patch-1

Update Grass7Utils.py. Fixes #20632 #20502
  • Loading branch information
luipir committed Nov 27, 2018
2 parents 6cc41a9 + 31f3f69 commit 42e30b652461992c6fa5d656581ba446f44e693f
Showing with 6 additions and 0 deletions.
  1. +6 −0 python/plugins/processing/algs/grass7/Grass7Utils.py
@@ -400,6 +400,11 @@ def executeGrass(commands, feedback, outputCommands=None):
# commands again.
if not grassOutDone and outputCommands:
command, grassenv = Grass7Utils.prepareGrassExecution(outputCommands)
# For MS-Windows, we need to hide the console window.
if isWindows():
si = subprocess.STARTUPINFO()
si.dwFlags |= subprocess.STARTF_USESHOWWINDOW
si.wShowWindow = subprocess.SW_HIDE
with subprocess.Popen(
command,
shell=False,
@@ -408,6 +413,7 @@ def executeGrass(commands, feedback, outputCommands=None):
stderr=subprocess.STDOUT,
universal_newlines=True,
env=grassenv,
encoding="cp{}".format(Grass7Utils.getWindowsCodePage()) if isWindows() else None,
startupinfo=si if isWindows() else None
) as proc:
for line in iter(proc.stdout.readline, ''):

0 comments on commit 42e30b6

Please sign in to comment.
You can’t perform that action at this time.