diff options
-rw-r--r-- | paramiko/proxy.py | 9 | ||||
-rw-r--r-- | tests/test_config.py | 1 | ||||
-rw-r--r-- | tests/test_proxy.py | 2 |
3 files changed, 7 insertions, 5 deletions
diff --git a/paramiko/proxy.py b/paramiko/proxy.py index 61591b81..c04058f8 100644 --- a/paramiko/proxy.py +++ b/paramiko/proxy.py @@ -29,7 +29,7 @@ import time subprocess, subprocess_import_error = None, None try: import subprocess -except ImportError as e: +except ImportError: pass from paramiko.ssh_exception import ProxyCommandFailure @@ -60,8 +60,11 @@ class ProxyCommand(ClosingContextManager): raise subprocess_import_error self.cmd = shlex.split(command_line) self.process = subprocess.Popen( - self.cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, - stderr=subprocess.PIPE, bufsize=0 + self.cmd, + stdin=subprocess.PIPE, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + bufsize=0, ) self.timeout = None diff --git a/tests/test_config.py b/tests/test_config.py index 7d7a169f..57dda537 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -3,7 +3,6 @@ from os.path import expanduser -import pytest from pytest import raises, mark from paramiko import SSHConfig, SSHConfigDict diff --git a/tests/test_proxy.py b/tests/test_proxy.py index ef4a2a36..9d707a4a 100644 --- a/tests/test_proxy.py +++ b/tests/test_proxy.py @@ -78,7 +78,7 @@ class TestProxyCommand(object): os_read.side_effect = socket.timeout proxy = ProxyCommand("hi") with raises(socket.timeout): - data = proxy.recv(5) + proxy.recv(5) assert os_read.call_args[0] == (fileno, 5) @patch("paramiko.proxy.subprocess.Popen") |