From 20775221114f905a26bf79c2ca715cad68827694 Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Thu, 6 Dec 2012 17:58:57 -0800 Subject: [PATCH] Just use a list generator --- anvil/components/glance.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/anvil/components/glance.py b/anvil/components/glance.py index c5948926..666fd293 100644 --- a/anvil/components/glance.py +++ b/anvil/components/glance.py @@ -70,17 +70,8 @@ class GlanceInstaller(comp.PythonInstallComponent): return list(CONFIGS) def _filter_pip_requires(self, fn, lines): - new_lines = [] - for line in lines: - # Anvil handles installing these if needed - # and not setup.py - if utils.has_any(line.lower(), 'swift', 'keystoneclient'): - continue - elif line.strip().startswith("-e"): - continue - else: - new_lines.append(line) - return new_lines + return [l for l in lines + if not utils.has_any(l.lower(), 'swift', 'keystoneclient')] def pre_install(self): comp.PythonInstallComponent.pre_install(self)