mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 22:00:22 -07:00
parent
c063803a91
commit
f4d68b8860
4 changed files with 14 additions and 11 deletions
|
@ -48,6 +48,7 @@ from ansible.playbook.task import Task
|
|||
from ansible.vars.unsafe_proxy import AnsibleJSONUnsafeDecoder
|
||||
|
||||
from ansible.utils.debug import debug
|
||||
from ansible.utils.unicode import to_unicode
|
||||
|
||||
__all__ = ['WorkerProcess']
|
||||
|
||||
|
@ -135,11 +136,11 @@ class WorkerProcess(multiprocessing.Process):
|
|||
try:
|
||||
self._host.vars = dict()
|
||||
self._host.groups = []
|
||||
task_result = TaskResult(self._host, self._task, dict(failed=True, exception=traceback.format_exc(), stdout=''))
|
||||
task_result = TaskResult(self._host, self._task, dict(failed=True, exception=to_unicode(traceback.format_exc()), stdout=''))
|
||||
self._rslt_q.put(task_result, block=False)
|
||||
except:
|
||||
debug("WORKER EXCEPTION: %s" % e)
|
||||
debug("WORKER EXCEPTION: %s" % traceback.format_exc())
|
||||
debug(u"WORKER EXCEPTION: %s" % to_unicode(e))
|
||||
debug(u"WORKER EXCEPTION: %s" % to_unicode(traceback.format_exc()))
|
||||
|
||||
debug("WORKER PROCESS EXITING")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue