Hostname support

This patch adds support for hostname values in all host related
parameters in answer file.

Resolves-bug: rhbz#1129773

Change-Id: I4e912ac0b5a6feab30866da3dd5525fbc6824460
This commit is contained in:
Martin Mágr
2014-09-15 13:32:33 +02:00
committed by Lukas Bezdicka
parent 3dc35d6931
commit 64170f1609
27 changed files with 138 additions and 92 deletions

View File

@@ -254,10 +254,9 @@ def touch_port(host, port):
key = "%s:%d" % (host, port)
if key in _tested_ports:
return
s = socket.socket(validate_ip(host), socket.SOCK_STREAM)
s.connect((host, port))
s.shutdown(socket.SHUT_RDWR)
s.close()
sock = socket.create_connection((host, port))
sock.shutdown(socket.SHUT_RDWR)
sock.close()
_tested_ports.append(key)