mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
OP-2414 - refactor non python kwargs
This commit is contained in:
parent
d732363d1a
commit
63229f32c2
1 changed files with 3 additions and 2 deletions
|
|
@ -289,19 +289,20 @@ def get_non_python_host_kwargs(kwargs, allow_console=True):
|
|||
"""
|
||||
if kwargs is None:
|
||||
kwargs = {}
|
||||
|
||||
if platform.system().lower() == "windows":
|
||||
|
||||
executable_path = os.environ.get("OPENPYPE_EXECUTABLE")
|
||||
executable_filename = ""
|
||||
if executable_path:
|
||||
executable_filename = os.path.dirname(executable_path)
|
||||
executable_filename = os.path.basename(executable_path)
|
||||
if "openpype_gui" in executable_filename:
|
||||
kwargs.update({
|
||||
"creationflags": subprocess.CREATE_NO_WINDOW,
|
||||
"stdout": subprocess.DEVNULL,
|
||||
"stderr": subprocess.DEVNULL
|
||||
})
|
||||
else:
|
||||
elif allow_console:
|
||||
kwargs.update({
|
||||
"creationflags": subprocess.CREATE_NEW_CONSOLE
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue