From: Zac Medico Date: Sun, 22 Jul 2007 06:08:48 +0000 (-0000) Subject: Prevent a potential KeyError when removing world from the digraph for --prune display. X-Git-Tag: v2.2_pre1~973 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=694e024afdcae81ff2bb7c33b5f6aa4c48289082;p=portage.git Prevent a potential KeyError when removing world from the digraph for --prune display. svn path=/main/trunk/; revision=7344 --- diff --git a/pym/emerge/__init__.py b/pym/emerge/__init__.py index 3799627ef..40c9151f6 100644 --- a/pym/emerge/__init__.py +++ b/pym/emerge/__init__.py @@ -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):