defined custom constant as subprocess may not have defined CREATE_NO_WINDOW constant in all python builds

This commit is contained in:
iLLiCiTiT 2021-05-06 20:37:44 +02:00
parent b59da71aa9
commit 97103ab89c
3 changed files with 8 additions and 5 deletions

View file

@ -26,7 +26,8 @@ from .terminal import Terminal
from .execute import (
get_pype_execute_args,
execute,
run_subprocess
run_subprocess,
CREATE_NO_WINDOW
)
from .log import PypeLogger, timeit
from .mongo import (

View file

@ -6,6 +6,9 @@ from .log import PypeLogger as Logger
log = logging.getLogger(__name__)
# MSDN process creation flag (Windows only)
CREATE_NO_WINDOW = 0x08000000
def execute(args,
silent=False,

View file

@ -17,7 +17,8 @@ from openpype.lib import (
get_pype_execute_args,
should_decompress,
get_decompress_dir,
decompress
decompress,
CREATE_NO_WINDOW
)
@ -253,9 +254,7 @@ class ExtractBurnin(openpype.api.Extractor):
"env": {}
}
if platform.system().lower() == "windows":
process_kwargs["creationflags"] = (
subprocess.CREATE_NO_WINDOW
)
process_kwargs["creationflags"] = CREATE_NO_WINDOW
openpype.api.run_subprocess(args, **process_kwargs)
# Remove the temporary json