mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Updates uri to use six for isinstance comparison for py3 compatibility (#20239)
This commit is contained in:
parent
d25a70846f
commit
8928adf62e
1 changed files with 1 additions and 1 deletions
|
@ -401,7 +401,7 @@ def main():
|
||||||
|
|
||||||
if body_format == 'json':
|
if body_format == 'json':
|
||||||
# Encode the body unless its a string, then assume it is pre-formatted JSON
|
# Encode the body unless its a string, then assume it is pre-formatted JSON
|
||||||
if not isinstance(body, basestring):
|
if not isinstance(body, six.string_types):
|
||||||
body = json.dumps(body)
|
body = json.dumps(body)
|
||||||
lower_header_keys = [key.lower() for key in dict_headers]
|
lower_header_keys = [key.lower() for key in dict_headers]
|
||||||
if 'content-type' not in lower_header_keys:
|
if 'content-type' not in lower_header_keys:
|
||||||
|
|
Loading…
Reference in a new issue