X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=doctor_tests%2Fcommon%2Futils.py;h=1a84c824093badef17763675960715e9daf3e730;hb=9fd701278bf7d8c5b9451491bcb1a92580adc780;hp=d2962a8a4ccd7bafda392cd0f8e0e63128928ab0;hpb=ff43740199fc14ad01b05ed0d626f51f81eb82f2;p=doctor.git diff --git a/doctor_tests/common/utils.py b/doctor_tests/common/utils.py index d2962a8a..1a84c824 100644 --- a/doctor_tests/common/utils.py +++ b/doctor_tests/common/utils.py @@ -57,8 +57,7 @@ class SSHClient(object): key_filename=None, log=None, look_for_keys=False, allow_agent=False): self.client = paramiko.SSHClient() - self.client.load_system_host_keys() - self.client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) + self.client.set_missing_host_key_policy(paramiko.WarningPolicy()) self.client.connect(ip, username=username, password=password, pkey=pkey, key_filename=key_filename, look_for_keys=look_for_keys, @@ -78,7 +77,8 @@ class SSHClient(object): output.append(line.decode('utf-8')) if ret: if self.log: - self.log.info("*** FAILED to run command %s (%s)" % (command, ret)) + self.log.info("*** FAILED to run command %s (%s)" + % (command, ret)) raise Exception( "Unable to run \ncommand: %s\nret: %s" % (command, ret))