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
21fdb2bb
Commit
21fdb2bb
authored
Jan 03, 2014
by
James Tanner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #5200 Handle template contents with unicode strings better
parent
1270e235
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletions
+8
-1
lib/ansible/utils/template.py
+8
-1
No files found.
lib/ansible/utils/template.py
View file @
21fdb2bb
...
...
@@ -497,7 +497,14 @@ def template_from_file(basedir, path, vars):
if
data
.
endswith
(
'
\n
'
)
and
not
res
.
endswith
(
'
\n
'
):
res
=
res
+
'
\n
'
return
template
(
basedir
,
res
,
vars
)
if
isinstance
(
res
,
unicode
):
# do not try to re-template a unicode string
result
=
res
else
:
result
=
template
(
basedir
,
res
,
vars
)
return
result
def
template_from_string
(
basedir
,
data
,
vars
,
fail_on_undefined
=
False
):
''' run a string through the (Jinja2) templating engine '''
...
...
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