Prevent install scripts fail silently if timeout exceeded

socket.timeout() exceptions need description, otherwise no error message
is printed on console.

Reviewed-By: Tomas Babej <tbabej@redhat.com>
This commit is contained in:
Martin Basti
2015-01-22 17:09:22 +01:00
committed by Tomas Babej
parent 9549a5984b
commit d5035c0ed9

View File

@@ -1150,7 +1150,7 @@ def wait_for_open_ports(host, ports, timeout=0):
if port_open:
break
if timeout and time.time() > op_timeout: # timeout exceeded
raise socket.timeout()
raise socket.timeout("Timeout exceeded")
time.sleep(1)
def wait_for_open_socket(socket_name, timeout=0):