mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Update http.py
remove duplicate checks
This commit is contained in:
parent
908c040ac3
commit
269514683f
1 changed files with 2 additions and 4 deletions
|
@ -429,8 +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):
|
||||
if six.PY3 and isinstance(result_text, bytes):
|
||||
result_text = result.body.decode('utf-8')
|
||||
ret['body'] = result_text
|
||||
else:
|
||||
|
@ -532,8 +531,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):
|
||||
if six.PY3 and isinstance(result_text, bytes):
|
||||
result_text = result_text.decode('utf-8')
|
||||
ret['body'] = result_text
|
||||
if 'Set-Cookie' in result_headers.keys() and cookies is not None:
|
||||
|
|
Loading…
Add table
Reference in a new issue