diff --git a/contrib/inventory/ec2.py b/contrib/inventory/ec2.py index f9a943efbe0..86327360b90 100755 --- a/contrib/inventory/ec2.py +++ b/contrib/inventory/ec2.py @@ -389,7 +389,7 @@ class Ec2Inventory(object): self.ec2_instance_filters = defaultdict(list) if config.has_option('ec2', 'instance_filters'): - filters = [tag for tag in config.get('ec2', 'instance_filters').split(',') if tag] + filters = [f for f in config.get('ec2', 'instance_filters').split(',') if f] for instance_filter in filters: instance_filter = instance_filter.strip()