Merge pull request #48897 from rallytime/bp-48863

Back-port #48863 to 2018.3
This commit is contained in:
Nicole Thomas 2018-08-05 15:15:50 -04:00 committed by GitHub
commit 070af9d925
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1118,8 +1118,7 @@ def _get_template_texts(source_list=None,
tmplines = None
with salt.utils.files.fopen(rndrd_templ_fn, 'rb') as fp_:
tmplines = fp_.read()
if six.PY3:
tmplines = tmplines.decode(__salt_system_encoding__)
tmplines = tmplines.decode(__salt_system_encoding__)
tmplines = tmplines.splitlines(True)
if not tmplines:
msg = 'Failed to read rendered template file {0} ({1})'