mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Use six to check for string_types
This commit is contained in:
parent
50932ce556
commit
e8768b2b87
1 changed files with 1 additions and 3 deletions
|
@ -694,9 +694,7 @@ class Ec2Inventory(object):
|
|||
instance_vars['ec2_previous_state_code'] = instance.previous_state_code
|
||||
elif type(value) in [int, bool]:
|
||||
instance_vars[key] = value
|
||||
elif six.PY2 and type(value) in [str, unicode]:
|
||||
instance_vars[key] = value.strip()
|
||||
elif six.PY3 and type(value) in [str]:
|
||||
elif isinstance(value, six.string_types):
|
||||
instance_vars[key] = value.strip()
|
||||
elif type(value) == type(None):
|
||||
instance_vars[key] = ''
|
||||
|
|
Loading…
Reference in a new issue