mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
fix TypeError in python 3
move 383d1e9970
to 2017.7
python3 expect str instead of bytes
This commit is contained in:
parent
a4358dfa36
commit
177fd18671
1 changed files with 2 additions and 0 deletions
|
@ -429,6 +429,8 @@ 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):
|
||||
result_text = result.body.decode('utf-8')
|
||||
ret['body'] = result_text
|
||||
else:
|
||||
# Tornado
|
||||
|
|
Loading…
Add table
Reference in a new issue