Simplify code by passing a list of flags to Package.iuse.is_valid_flag
authorSebastian Luther <SebastianLuther@gmx.de>
Tue, 25 May 2010 11:03:01 +0000 (13:03 +0200)
committerZac Medico <zmedico@gentoo.org>
Tue, 25 May 2010 11:43:46 +0000 (04:43 -0700)
pym/_emerge/depgraph.py

index a03f04aede2cf01623dc7c88cecda7424f835b54..d4f70d03b4f4a1edda894a66824e01bf2004a2f1 100644 (file)
@@ -2621,11 +2621,7 @@ class depgraph(object):
                                                found_available_arg = True
 
                                        if atom.use:
-                                               missing_iuse = False
-                                               for x in atom.use.required:
-                                                       if not pkg.iuse.is_valid_flag(x):
-                                                               missing_iuse = True
-                                                               break
+                                               missing_iuse = pkg.iuse.is_valid_flag(atom.use.required)
                                                if missing_iuse:
                                                        # Don't add this to packages_with_invalid_use_config
                                                        # since IUSE cannot be adjusted by the user.