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
ed73b45e
Commit
ed73b45e
authored
Sep 28, 2015
by
James Cammarata
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #12540 from mgedmin/py3k
Python 3: the StringIO module is gone
parents
4cd810a6
9b39af8e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
lib/ansible/template/__init__.py
+2
-3
No files found.
lib/ansible/template/__init__.py
View file @
ed73b45e
...
...
@@ -19,13 +19,12 @@
from
__future__
import
(
absolute_import
,
division
,
print_function
)
__metaclass__
=
type
import
StringIO
import
ast
import
contextlib
import
os
import
re
from
six
import
string_types
,
text_type
,
binary_type
from
six
import
string_types
,
text_type
,
binary_type
,
StringIO
from
jinja2
import
Environment
from
jinja2.loaders
import
FileSystemLoader
from
jinja2.exceptions
import
TemplateSyntaxError
,
UndefinedError
...
...
@@ -214,7 +213,7 @@ class Templar:
if
not
isinstance
(
orig_data
,
string_types
):
return
orig_data
with
contextlib
.
closing
(
StringIO
.
StringIO
(
orig_data
))
as
data
:
with
contextlib
.
closing
(
StringIO
(
orig_data
))
as
data
:
# these variables keep track of opening block locations, as we only
# want to replace matched pairs of print/block tags
print_openings
=
[]
...
...
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