summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ansible-connection4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/ansible-connection b/bin/ansible-connection
index a09e81e74b..36d2257621 100755
--- a/bin/ansible-connection
+++ b/bin/ansible-connection
@@ -113,6 +113,7 @@ class ConnectionProcess(object):
self.sock.listen(1)
messages.append(('vvvv', 'local domain socket listeners started successfully'))
except Exception as exc:
+ messages.extend(self.connection.pop_messages())
result['error'] = to_text(exc)
result['exception'] = traceback.format_exc()
finally:
@@ -304,7 +305,8 @@ def main():
'exception': traceback.format_exc()
})
- messages.extend(Connection(socket_path).pop_messages())
+ if os.path.exists(socket_path):
+ messages.extend(Connection(socket_path).pop_messages())
messages.append(('vvvv', sys.stdout.getvalue()))
result.update({
'messages': messages,