Commit 02461259 by Sheng

Removed MissingHostKeyPolicy base class

parent 53ed3aef
...@@ -34,7 +34,6 @@ workers = {} ...@@ -34,7 +34,6 @@ workers = {}
class AutoAddPolicy(paramiko.client.MissingHostKeyPolicy): class AutoAddPolicy(paramiko.client.MissingHostKeyPolicy):
""" """
thread-safe AutoAddPolicy thread-safe AutoAddPolicy
""" """
...@@ -353,7 +352,8 @@ def get_policy_class(policy): ...@@ -353,7 +352,8 @@ def get_policy_class(policy):
policy += 'policy' policy += 'policy'
dic = {k.lower(): v for k, v in vars(paramiko.client).items() if type(v) dic = {k.lower(): v for k, v in vars(paramiko.client).items() if type(v)
is type and issubclass(v, paramiko.client.MissingHostKeyPolicy)} is type and issubclass(v, paramiko.client.MissingHostKeyPolicy)
and v is not paramiko.client.MissingHostKeyPolicy}
try: try:
cls = dic[policy] cls = dic[policy]
except KeyError: except KeyError:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment