Commit 41af2fce by Michael DeHaan

Merge pull request #1650 from dagwieers/port-not-integer-exception

Provide a proper error when the remote_port is not an integer
parents 3ce63d84 85bba04a
......@@ -382,6 +382,11 @@ class Runner(object):
try:
if actual_port is not None:
actual_port = int(actual_port)
except ValueError, e:
result = dict(failed=True, msg="FAILED: Configured port \"%s\" is not a valid port, expected integer" % actual_port)
return ReturnData(host=host, comm_ok=False, result=result)
try:
conn = self.connector.connect(actual_host, actual_port)
if delegate_to or host != actual_host:
conn.delegate = host
......
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