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
ca3d5feb67
commit
a13b72ae01
|
|
@ -42,12 +42,17 @@ class SSHSocket(socket.socket):
|
||||||
port,
|
port,
|
||||||
'docker system dial-stdio'
|
'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(
|
self.proc = subprocess.Popen(
|
||||||
' '.join(args),
|
' '.join(args),
|
||||||
shell=True,
|
shell=True,
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
stdin=subprocess.PIPE,
|
stdin=subprocess.PIPE,
|
||||||
preexec_fn=lambda: signal.signal(signal.SIGINT, signal.SIG_IGN))
|
preexec_fn=preexec_func)
|
||||||
|
|
||||||
def _write(self, data):
|
def _write(self, data):
|
||||||
if not self.proc or self.proc.stdin.closed:
|
if not self.proc or self.proc.stdin.closed:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue