ansible: fix test for 3.x.

pull/295/head
David Wilson 6 years ago
parent 34751c38b0
commit b21d51be47

@ -9,7 +9,7 @@ def main():
module = AnsibleModule(argument_spec={'name': {'type': 'str'}})
try:
module.exit_json(addr=socket.gethostbyname(module.params['name']))
except socket.error, e:
except socket.error as e:
module.fail_json(msg=str(e))
if __name__ == '__main__':

Loading…
Cancel
Save