diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2017-09-13 09:51:10 -0700 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2017-09-13 09:51:10 -0700 |
commit | 37063ef39362837bb55afbfa19bb692361e96602 (patch) | |
tree | 7d64a9a727efe7d09e79577f6cad685676918674 /paramiko/client.py | |
parent | 4a1153cf8d88d83dfa41a7ba43c9320f3aaa3ee1 (diff) | |
download | paramiko-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.py | 11 |
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: |