mirror of https://github.com/docker/docker-py.git
Avoid setting unsuported parameter for subprocess.Popen on Windows
Signed-off-by: aiordache <anca.iordache@docker.com>
This commit is contained in:
parent
4757eea80c
commit
3ec7fee736
|
|
@ -42,12 +42,17 @@ class SSHSocket(socket.socket):
|
|||
port,
|
||||
'docker system dial-stdio'
|
||||
]
|
||||
|
||||
preexec_func = None
|
||||
if not constants.IS_WINDOWS_PLATFORM:
|
||||
preexec_func = lambda: signal.signal(signal.SIGINT, signal.SIG_IGN)
|
||||
|
||||
self.proc = subprocess.Popen(
|
||||
' '.join(args),
|
||||
shell=True,
|
||||
stdout=subprocess.PIPE,
|
||||
stdin=subprocess.PIPE,
|
||||
preexec_fn=lambda: signal.signal(signal.SIGINT, signal.SIG_IGN))
|
||||
preexec_fn=preexec_func)
|
||||
|
||||
def _write(self, data):
|
||||
if not self.proc or self.proc.stdin.closed:
|
||||
|
|
|
|||
Loading…
Reference in New Issue