The list comprehensions are easier to read.
Signed-off-by: Dylan Baker <[email protected]>
---
framework/environment.py | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/framework/environment.py b/framework/environment.py
index c991622..f7027ba 100644
--- a/framework/environment.py
+++ b/framework/environment.py
@@ -62,10 +62,8 @@ class Environment:
This code uses re.compile to rebuild the lists and set self.filter
"""
- for each in include_filter:
- self.filter.append(re.compile(each))
- for each in exclude_filter:
- self.exclude_filter.append(re.compile(each))
+ self.filter = [re.compile(x) for x in include_filter]
+ self.exclude_filter = [re.compile(x) for x in exclude_filter]
def __iter__(self):
for key, values in self.__dict__.iteritems():
--
1.8.5.2
_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit