summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-07-22 06:08:48 +0000
committerZac Medico <zmedico@gentoo.org>2007-07-22 06:08:48 +0000
commit694e024afdcae81ff2bb7c33b5f6aa4c48289082 (patch)
treec55c9d6ce5f4a45cefd61c02e455a4c4dae8c026
parentb59c4542eab4b88134324cb22608860031c6b45f (diff)
downloadportage-694e024afdcae81ff2bb7c33b5f6aa4c48289082.tar.gz
portage-694e024afdcae81ff2bb7c33b5f6aa4c48289082.tar.bz2
portage-694e024afdcae81ff2bb7c33b5f6aa4c48289082.zip
Prevent a potential KeyError when removing world from the digraph for --prune display.
svn path=/main/trunk/; revision=7344
-rw-r--r--pym/emerge/__init__.py3
1 files changed, 2 insertions, 1 deletions
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):