Prevent a potential KeyError when removing world from the digraph for --prune display.
authorZac Medico <zmedico@gentoo.org>
Sun, 22 Jul 2007 06:08:48 +0000 (06:08 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 22 Jul 2007 06:08:48 +0000 (06:08 -0000)
svn path=/main/trunk/; revision=7344

pym/emerge/__init__.py

index 3799627eff0d3e24391ad847bc734b3990ae16e1..40c9151f629fc4c1c2218f4138b8be473961ecfe 100644 (file)
@@ -5541,7 +5541,8 @@ def action_depclean(settings, trees, ldpath_mtimes,
        elif action == "prune":
                # Prune really uses all installed instead of world.  It's not a real
                # reverse dependency so don't display it as such.
-               graph.remove("world")
+               if graph.contains("world"):
+                       graph.remove("world")
                for atom in args_set:
                        for pkg in vardb.match(atom):
                                if not fakedb.cpv_exists(pkg):