diff options
-rw-r--r-- | paramiko/client.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/paramiko/client.py b/paramiko/client.py index 8e9038dd..08fe69d4 100644 --- a/paramiko/client.py +++ b/paramiko/client.py @@ -22,6 +22,7 @@ SSH client & key policies from binascii import hexlify import getpass +import inspect import os import socket import warnings @@ -182,6 +183,8 @@ class SSHClient (ClosingContextManager): the policy to use when receiving a host key from a previously-unknown server """ + if inspect.isclass(policy): + policy = policy() self._policy = policy def _families_and_addresses(self, hostname, port): |