mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
don't use shell=True in extract burnin subprocess
This commit is contained in:
parent
ed6584146d
commit
f8f528a42f
1 changed files with 10 additions and 8 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import os
|
||||
import re
|
||||
import subprocess
|
||||
import json
|
||||
import copy
|
||||
import tempfile
|
||||
|
|
@ -124,11 +125,6 @@ class ExtractBurnin(openpype.api.Extractor):
|
|||
# [pype executable, *pype script, "run"]
|
||||
executable_args = get_pype_execute_args("run", scriptpath)
|
||||
|
||||
# Environments for script process
|
||||
env = os.environ.copy()
|
||||
# pop PYTHONPATH
|
||||
env.pop("PYTHONPATH", None)
|
||||
|
||||
for idx, repre in enumerate(tuple(instance.data["representations"])):
|
||||
self.log.debug("repre ({}): `{}`".format(idx + 1, repre["name"]))
|
||||
if not self.repres_is_valid(repre):
|
||||
|
|
@ -251,10 +247,16 @@ class ExtractBurnin(openpype.api.Extractor):
|
|||
self.log.debug("Executing: {}".format(" ".join(args)))
|
||||
|
||||
# Run burnin script
|
||||
openpype.api.run_subprocess(
|
||||
args, shell=True, logger=self.log, env=env
|
||||
)
|
||||
process_kwargs = {
|
||||
"logger": self.log,
|
||||
"env": {}
|
||||
}
|
||||
if platform.system().lower() == "windows":
|
||||
process_kwargs["creationflags"] = (
|
||||
subprocess.CREATE_NO_WINDOW
|
||||
)
|
||||
|
||||
openpype.api.run_subprocess(args, **process_kwargs)
|
||||
# Remove the temporary json
|
||||
os.remove(temporary_json_filepath)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue