Conditionally import StringIO in template so we only use io.StringIO on py3
This commit is contained in:
parent
7404d4ce7f
commit
3247390123
1 changed files with 5 additions and 1 deletions
|
@ -23,7 +23,11 @@ import ast
|
|||
import contextlib
|
||||
import os
|
||||
import re
|
||||
from io import StringIO
|
||||
|
||||
try:
|
||||
from StringIO import StringIO
|
||||
except ImportError:
|
||||
from io import StringIO
|
||||
|
||||
from ansible.compat.six import string_types, text_type, binary_type
|
||||
from jinja2 import Environment
|
||||
|
|
Loading…
Reference in a new issue