Coerce string when calling compile_template_str

Previously on python3 this would otherwise pass bytes (unhandled)
This commit is contained in:
Gabriel 2018-10-08 16:31:27 -04:00 committed by rallytime
parent fef7669a15
commit 958c630e5c
No known key found for this signature in database
GPG key ID: E8F1A4B90D0DEA19

View file

@ -158,6 +158,7 @@ import salt.utils.path
import salt.utils.stringio
import salt.template
from salt.ext import six
from salt.utils.stringutils import to_str
# Set up logging
log = logging.getLogger(__name__)
@ -251,7 +252,7 @@ def _construct_pillar(top_dir,
else:
data = contents
if template is True:
data = salt.template.compile_template_str(template=contents,
data = salt.template.compile_template_str(template=to_str(contents),
renderers=renderers,
default=render_default,
blacklist=renderer_blacklist,