mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
fixed environment passing to subprocess
This commit is contained in:
parent
7ff6f468fa
commit
8ed99e5759
1 changed files with 4 additions and 1 deletions
|
|
@ -19,12 +19,15 @@ log = logging.getLogger(__name__)
|
|||
def _subprocess(args):
|
||||
"""Convenience method for getting output errors for subprocess."""
|
||||
|
||||
# make sure environment contains only strings
|
||||
env = {k: str(v) for k, v in os.environ.items()}
|
||||
|
||||
proc = subprocess.Popen(
|
||||
args,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT,
|
||||
stdin=subprocess.PIPE,
|
||||
env=os.environ
|
||||
env=env
|
||||
)
|
||||
|
||||
output = proc.communicate()[0]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue