summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBrian Coca <brian.coca+git@gmail.com>2017-10-12 12:58:25 -0400
committerBrian Coca <brian.coca+git@gmail.com>2017-10-12 12:58:25 -0400
commit03a0ea682b77ed406c88b3297768e64e07c2e8ef (patch)
tree6796c128f59f43885f5e051655e20267272d69d4 /lib
parent152c895b1f0bb9abb89dca47b9e9cb5cee946460 (diff)
downloadansible-03a0ea682b77ed406c88b3297768e64e07c2e8ef.tar.gz
restored 2.4/2.5 compat
Diffstat (limited to 'lib')
-rw-r--r--lib/ansible/modules/utilities/logic/wait_for.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/ansible/modules/utilities/logic/wait_for.py b/lib/ansible/modules/utilities/logic/wait_for.py
index 0b93f31091..c42a2b3067 100644
--- a/lib/ansible/modules/utilities/logic/wait_for.py
+++ b/lib/ansible/modules/utilities/logic/wait_for.py
@@ -552,7 +552,8 @@ def main():
# Shutdown the client socket
try:
s.shutdown(socket.SHUT_RDWR)
- except socket.error as e:
+ except socket.error:
+ e = get_exception()
if e.errno != errno.ENOTCONN:
raise
# else, the server broke the connection on its end, assume it's not ready
@@ -565,7 +566,8 @@ def main():
# Connection established, success!
try:
s.shutdown(socket.SHUT_RDWR)
- except socket.error as e:
+ except socket.error:
+ e = get_exception()
if e.errno != errno.ENOTCONN:
raise
# else, the server broke the connection on its end, assume it's not ready