Commit 92b15996 authored by eric pellegrini's avatar eric pellegrini Committed by Remi Perenon

Fixed regression when running a job directly from the GUI

parent 77edb103
Pipeline #4453 passed with stages
in 23 minutes and 47 seconds
......@@ -112,15 +112,13 @@ class JobPlugin(ComponentPlugin):
self._job.save(filename, parameters)
if PLATFORM.name == "windows":
startupinfo = subprocess.STARTUPINFO()
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
startupinfo.wShowWindow = subprocess.SW_HIDE
else:
startupinfo = None
try:
subprocess.check_output([sys.executable, filename],stderr=subprocess.STDOUT)
from subprocess import DEVNULL
except ImportError:
DEVNULL = os.open(os.devnull, os.O_RDWR)
try:
subprocess.check_output([sys.executable, filename], stdin=DEVNULL, stderr=DEVNULL)
except subprocess.CalledProcessError as e:
message = e.output
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment