summaryrefslogtreecommitdiff
path: root/paramiko
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2023-01-16 20:48:13 -0500
committerJeff Forcier <jeff@bitprophet.org>2023-01-16 20:49:29 -0500
commit53460723a6ab342129ac456ef6a4ba5ef676b577 (patch)
tree718fb15f6d6147ab05ebf898bb8f3534cc1dc981 /paramiko
parentdfaee46c5f256d11c7b6e9ffec2e4e3f7af721fe (diff)
downloadparamiko-53460723a6ab342129ac456ef6a4ba5ef676b577.tar.gz
Stop stripping ProxyCommand none, make it None
Also apparently the old, old test for this had the wrong issue number in it :(
Diffstat (limited to 'paramiko')
-rw-r--r--paramiko/config.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/paramiko/config.py b/paramiko/config.py
index 2358102b..48bcb101 100644
--- a/paramiko/config.py
+++ b/paramiko/config.py
@@ -159,9 +159,8 @@ class SSHConfig:
context["matches"] = self._get_matches(value)
# Special-case for noop ProxyCommands
elif key == "proxycommand" and value.lower() == "none":
- # Store 'none' as None; prior to 3.x, it will get stripped out
- # at the end (for compatibility with issue #415). After 3.x, it
- # will simply not get stripped, leaving a nice explicit marker.
+ # Store 'none' as None - not as a string implying that the
+ # proxycommand is the literal shell command "none"!
context["config"][key] = None
# All other keywords get stored, directly or via append
else:
@@ -267,9 +266,6 @@ class SSHConfig:
# Expand variables in resulting values (besides 'Match exec' which was
# already handled above)
options = self._expand_variables(options, hostname)
- # TODO: remove in 3.x re #670
- if "proxycommand" in options and options["proxycommand"] is None:
- del options["proxycommand"]
return options
def canonicalize(self, hostname, options, domains):