Merge "Set socket timeout for SSH keyscan" into feature/zuulv3

This commit is contained in:
Jenkins 2017-06-05 13:32:53 +00:00 committed by Gerrit Code Review
commit 399503f3ac
1 changed files with 1 additions and 0 deletions

View File

@ -68,6 +68,7 @@ def keyscan(ip, timeout=60):
t = None
try:
sock = socket.socket(family, socket.SOCK_STREAM)
sock.settimeout(timeout)
sock.connect(sockaddr)
t = paramiko.transport.Transport(sock)
t.start_client()