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

Commit

Permalink
Merge pull request #1675 from pypeclub/bugfix/redirect_stdout_from_gu…
Browse files Browse the repository at this point in the history
…i_executable

Ftrack subprocess handle of stdout/stderr
  • Loading branch information
iLLiCiTiT authored Jun 11, 2021
2 parents e7c5590 + 311c1c2 commit fbe01ab
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion openpype/modules/ftrack/ftrack_server/socket_thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,16 @@ def run(self):
*self.additional_args,
str(self.port)
)
self.subproc = subprocess.Popen(args, env=env, stdin=subprocess.PIPE)
kwargs = {
"env": env,
"stdin": subprocess.PIPE
}
if not sys.stdout:
# Redirect to devnull if stdout is None
kwargs["stdout"] = subprocess.DEVNULL
kwargs["stderr"] = subprocess.DEVNULL

self.subproc = subprocess.Popen(args, **kwargs)

# Listen for incoming connections
sock.listen(1)
Expand Down

0 comments on commit fbe01ab

Please sign in to comment.