From 7fb641c8316b0026fd1649cddb4b3aa48ef3dc3e Mon Sep 17 00:00:00 2001 From: EdLeafe Date: Thu, 28 May 2015 16:23:49 -0500 Subject: [PATCH] Remove use of builtin name Change the use of the name 'filter' to 'filter_' so that it doesn't conflict with the builtin function 'filter'. Change-Id: Iaa18aa54fbd8578c3b0d3313540393541c002720 Closes-Bug: #1459826 --- nova/filters.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nova/filters.py b/nova/filters.py index 5f060bbdc3d0..993102c9a676 100644 --- a/nova/filters.py +++ b/nova/filters.py @@ -68,10 +68,10 @@ class BaseFilterHandler(loadables.BaseLoader): def get_filtered_objects(self, filters, objs, filter_properties, index=0): list_objs = list(objs) LOG.debug("Starting with %d host(s)", len(list_objs)) - for filter in filters: - if filter.run_filter_for_index(index): - cls_name = filter.__class__.__name__ - objs = filter.filter_all(list_objs, filter_properties) + for filter_ in filters: + if filter_.run_filter_for_index(index): + cls_name = filter_.__class__.__name__ + objs = filter_.filter_all(list_objs, filter_properties) if objs is None: LOG.debug("Filter %s says to stop filtering", cls_name) return