mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
redirect stdout of ftrack process to devnull if sys.stdout is None
This commit is contained in:
parent
3122ddfb2e
commit
311c1c21bf
1 changed files with 10 additions and 1 deletions
|
|
@ -66,7 +66,16 @@ class SocketThread(threading.Thread):
|
|||
*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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue