Resolves #18312 python3 support for ec2.py

(cherry picked from commit 73da2663a3)
This commit is contained in:
Tony Kinsley 2016-11-02 13:45:13 -07:00 committed by Toshio Kuratomi
parent 182943f3b3
commit 2b9659945c

View file

@ -1313,7 +1313,7 @@ class Ec2Inventory(object):
elif key == 'ec2_tags': elif key == 'ec2_tags':
for k, v in value.items(): for k, v in value.items():
if self.expand_csv_tags and ',' in v: if self.expand_csv_tags and ',' in v:
v = map(lambda x: x.strip(), v.split(',')) v = list(map(lambda x: x.strip(), v.split(',')))
key = self.to_safe('ec2_tag_' + k) key = self.to_safe('ec2_tag_' + k)
instance_vars[key] = v instance_vars[key] = v
elif key == 'ec2_groups': elif key == 'ec2_groups':