summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorNathaniel Case <this.is@nathanielca.se>2018-12-20 16:38:59 -0500
committerGitHub <noreply@github.com>2018-12-20 16:38:59 -0500
commit62ec38323212da33a0db7032bf8a0d570cb410aa (patch)
tree0aaaf8214a62265afea162c79221b031153cc476 /bin
parent069e0b8d577ce0980588635650539ca73da0fe5b (diff)
downloadansible-62ec38323212da33a0db7032bf8a0d570cb410aa.tar.gz
Fix some handling of log messages from ansible-connection (#50214)
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,