Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Undefined constant in subprocess module #1485

Merged
merged 1 commit into from
May 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion openpype/lib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
from .execute import (
get_pype_execute_args,
execute,
run_subprocess
run_subprocess,
CREATE_NO_WINDOW
)
from .log import PypeLogger, timeit
from .mongo import (
Expand Down
3 changes: 3 additions & 0 deletions openpype/lib/execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

log = logging.getLogger(__name__)

# MSDN process creation flag (Windows only)
CREATE_NO_WINDOW = 0x08000000


def execute(args,
silent=False,
Expand Down
7 changes: 3 additions & 4 deletions openpype/plugins/publish/extract_burnin.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
get_pype_execute_args,
should_decompress,
get_decompress_dir,
decompress
decompress,
CREATE_NO_WINDOW
)


Expand Down Expand Up @@ -253,9 +254,7 @@ def main_process(self, instance):
"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
Expand Down