Convert basestring to string_types (#25228)
This commit is contained in:
parent
3a2699f1bf
commit
c1f0260ae3
1 changed files with 2 additions and 1 deletions
|
@ -119,6 +119,7 @@ import traceback
|
|||
import xml.etree.ElementTree as ET
|
||||
|
||||
import ansible.module_utils.six.moves.urllib.parse as urlparse
|
||||
from ansible.module_utils.six import string_types
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.ec2 import get_aws_connection_info, ec2_argument_spec
|
||||
from ansible.module_utils.ec2 import sort_json_policy_dict
|
||||
|
@ -210,7 +211,7 @@ def _create_or_update_bucket(connection, module, location):
|
|||
else:
|
||||
module.fail_json(msg=e.message)
|
||||
if policy is not None:
|
||||
if isinstance(policy, basestring):
|
||||
if isinstance(policy, string_types):
|
||||
policy = json.loads(policy)
|
||||
|
||||
if not policy:
|
||||
|
|
Loading…
Reference in a new issue