summaryrefslogtreecommitdiff
path: root/paramiko/client.py
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2017-09-13 09:51:10 -0700
committerJeff Forcier <jeff@bitprophet.org>2017-09-13 09:51:10 -0700
commit37063ef39362837bb55afbfa19bb692361e96602 (patch)
tree7d64a9a727efe7d09e79577f6cad685676918674 /paramiko/client.py
parent4a1153cf8d88d83dfa41a7ba43c9320f3aaa3ee1 (diff)
downloadparamiko-37063ef39362837bb55afbfa19bb692361e96602.tar.gz
Attempt to refactor gss_host setting and clean up/document its logic
Diffstat (limited to 'paramiko/client.py')
-rw-r--r--paramiko/client.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/paramiko/client.py b/paramiko/client.py
index ab40c7ad..86f5d896 100644
--- a/paramiko/client.py
+++ b/paramiko/client.py
@@ -353,12 +353,11 @@ class SSHClient (ClosingContextManager):
sock, gss_kex=gss_kex, gss_deleg_creds=gss_deleg_creds
)
t.use_compression(compress=compress)
- if gss_kex:
- if gss_host is None:
- t.set_gss_host(hostname, gss_trust_dns)
- elif gss_host is not None:
- # Don't canonicalize gss_host
- t.set_gss_host(gss_host, False)
+ t.set_gss_host(
+ kex_requested=gss_kex,
+ gss_host=gss_host,
+ trust_dns=gss_trust_dns,
+ )
if self._log_channel is not None:
t.set_log_channel(self._log_channel)
if banner_timeout is not None: