Fix code inside BlockerDB.findInstalledBlockers() to correctly strip multiple
authorZac Medico <zmedico@gentoo.org>
Sat, 27 Sep 2008 22:10:26 +0000 (22:10 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 27 Sep 2008 22:10:26 +0000 (22:10 -0000)
"!" characters when necessary. The code seemed to work fine anyway so this is
more a correctness fix than a bug fix.

svn path=/main/trunk/; revision=11575

pym/_emerge/__init__.py

index eb6b855b8228c85e842d7d36ae6877e4a1a7094e..519a1fdc27a07565e5a964f090f0e4436974871f 100644 (file)
@@ -3885,8 +3885,8 @@ class BlockerDB(object):
                        show_invalid_depstring_notice(new_pkg, depstr, atoms)
                        assert False
 
-               blocker_atoms = [atom[1:] for atom in atoms \
-                       if atom.startswith("!")]
+               blocker_atoms = [atom.lstrip("!") for atom in atoms \
+                       if atom[:1] == "!"]
                if blocker_atoms:
                        blocker_atoms = InternalPackageSet(initial_atoms=blocker_atoms)
                        for inst_pkg in installed_pkgs: