Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
6b315d57
Commit
6b315d57
authored
Jan 27, 2015
by
Toshio Kuratomi
Committed by
James Cammarata
Feb 17, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ansible.utils to_unicode/to_bytes isn't robust in the face of
non-strings. Do some value checking in the calling code
parent
71934a11
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletions
+6
-1
lib/ansible/callbacks.py
+6
-1
No files found.
lib/ansible/callbacks.py
View file @
6b315d57
...
...
@@ -27,6 +27,7 @@ import fcntl
import
constants
import
locale
from
ansible.color
import
stringc
from
ansible.module_utils
import
basic
import
logging
if
constants
.
DEFAULT_LOG_PATH
!=
''
:
...
...
@@ -456,8 +457,12 @@ class PlaybookRunnerCallbacks(DefaultRunnerCallbacks):
item
=
None
if
type
(
results
)
==
dict
:
item
=
results
.
get
(
'item'
,
None
)
if
isinstance
(
item
,
unicode
):
item
=
utils
.
to_bytes
(
item
)
results
=
basic
.
json_dict_unicode_to_bytes
(
results
)
else
:
results
=
utils
.
to_bytes
(
results
)
host
=
utils
.
to_bytes
(
host
)
results
=
utils
.
to_bytes
(
results
)
if
item
:
msg
=
"fatal: [
%
s] => (item=
%
s) =>
%
s"
%
(
host
,
item
,
results
)
else
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment