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
d6afb5d8
Commit
d6afb5d8
authored
Mar 25, 2015
by
Toshio Kuratomi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix assert to work with unicode values
parent
29809bb8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
lib/ansible/utils/__init__.py
+3
-3
No files found.
lib/ansible/utils/__init__.py
View file @
d6afb5d8
...
...
@@ -260,10 +260,10 @@ def check_conditional(conditional, basedir, inject, fail_on_undefined=False):
conditional
=
conditional
.
replace
(
"jinja2_compare "
,
""
)
# allow variable names
if
conditional
in
inject
and
'-'
not
in
str
(
inject
[
conditional
]
):
conditional
=
inject
[
conditional
]
if
conditional
in
inject
and
'-'
not
in
to_unicode
(
inject
[
conditional
],
nonstring
=
'simplerepr'
):
conditional
=
to_unicode
(
inject
[
conditional
],
nonstring
=
'simplerepr'
)
conditional
=
template
.
template
(
basedir
,
conditional
,
inject
,
fail_on_undefined
=
fail_on_undefined
)
original
=
str
(
conditional
)
.
replace
(
"jinja2_compare "
,
""
)
original
=
to_unicode
(
conditional
,
nonstring
=
'simplerepr'
)
.
replace
(
"jinja2_compare "
,
""
)
# a Jinja2 evaluation that results in something Python can eval!
presented
=
"{
%%
if
%
s
%%
} True {
%%
else
%%
} False {
%%
endif
%%
}"
%
conditional
conditional
=
template
.
template
(
basedir
,
presented
,
inject
)
...
...
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