summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--paramiko/proxy.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/paramiko/proxy.py b/paramiko/proxy.py
index ea481bca..059ba83e 100644
--- a/paramiko/proxy.py
+++ b/paramiko/proxy.py
@@ -21,11 +21,6 @@ from datetime import datetime
import os
from shlex import split as shlsplit
import signal
-try:
- from subprocess import Popen, PIPE
-except ImportError:
- # Subprocess module doesn't work on Google App Engine.
- Popen = PIPE = None
from select import select
import socket
import time
@@ -53,6 +48,9 @@ class ProxyCommand(ClosingContextManager):
:param str command_line:
the command that should be executed and used as the proxy.
"""
+ # NOTE: subprocess import done lazily so platforms without it (e.g.
+ # GAE) can still import us during overall Paramiko load.
+ from subprocess import Popen, PIPE
self.cmd = shlsplit(command_line)
self.process = Popen(self.cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE,
bufsize=0)