From 0b035a4e35510d8e9f710f15f513b59b4c64084c Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Wed, 15 Jul 2015 01:55:45 -0400 Subject: [PATCH] Unicode in result debug statements caused a traceback --- lib/ansible/executor/process/result.py | 2 +- lib/ansible/plugins/strategies/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/executor/process/result.py b/lib/ansible/executor/process/result.py index 2750261e04d..5e09bd7f84a 100644 --- a/lib/ansible/executor/process/result.py +++ b/lib/ansible/executor/process/result.py @@ -59,7 +59,7 @@ class ResultProcess(multiprocessing.Process): super(ResultProcess, self).__init__() def _send_result(self, result): - debug("sending result: %s" % (result,)) + debug(u"sending result: %s" % ([unicode(x) for x in result],)) self._final_q.put(result, block=False) debug("done sending result") diff --git a/lib/ansible/plugins/strategies/__init__.py b/lib/ansible/plugins/strategies/__init__.py index 46e1c7a13c7..1b4c1a2c1d6 100644 --- a/lib/ansible/plugins/strategies/__init__.py +++ b/lib/ansible/plugins/strategies/__init__.py @@ -155,7 +155,7 @@ class StrategyBase: while not self._final_q.empty() and not self._tqm._terminated: try: result = self._final_q.get(block=False) - debug("got result from result worker: %s" % (result,)) + debug("got result from result worker: %s" % ([unicode(x) for x in result],)) # all host status messages contain 2 entries: (msg, task_result) if result[0] in ('host_task_ok', 'host_task_failed', 'host_task_skipped', 'host_unreachable'):