compress two loop iterations into one
authorAlec Warner <antarus@gentoo.org>
Sat, 8 Sep 2007 21:52:55 +0000 (21:52 -0000)
committerAlec Warner <antarus@gentoo.org>
Sat, 8 Sep 2007 21:52:55 +0000 (21:52 -0000)
svn path=/main/trunk/; revision=7764

pym/portage/env/loaders.py

index ba250ecd47ac1a97b2f974bbbdcb24aaae09cd00..1d0ca01aac4bba924601e32222feabb7e6724ad3 100644 (file)
@@ -41,8 +41,7 @@ def RecursiveFileLoader(filename):
                for root, dirs, files in os.walk(filename):
                        if 'CVS' in dirs:
                                dirs.remove('CVS')
-                       files = [f for f in files if not f.startswith('.')]
-                       files = [f for f in files if not f.endswith('~')]
+                       files = [f for f in files if not f.startswith('.') and not f.endswith('~')]
                        for f in files:
                                yield os.path.join(root, f)
        else: