mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #45201 from rallytime/fix-jinja-template-test-failure
[2017.7] Check for running on python3 before decoding bytes
This commit is contained in:
commit
882267314f
1 changed files with 1 additions and 1 deletions
|
@ -429,7 +429,7 @@ def query(url,
|
|||
'charset' in res_params and \
|
||||
not isinstance(result_text, six.text_type):
|
||||
result_text = result_text.decode(res_params['charset'])
|
||||
if isinstance(result_text, bytes):
|
||||
if six.PY3 and isinstance(result_text, bytes):
|
||||
result_text = result.body.decode('utf-8')
|
||||
ret['body'] = result_text
|
||||
else:
|
||||
|
|
Loading…
Add table
Reference in a new issue