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

Ftrack subprocess handle of stdout/stderr #1675

Merged
merged 1 commit into from
Jun 11, 2021
Merged
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
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