Commit e8768b2b by Paul Logston

Use six to check for string_types

parent 50932ce5
......@@ -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] = ''
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment