summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-10-17 03:11:25 +0000
committerZac Medico <zmedico@gentoo.org>2006-10-17 03:11:25 +0000
commit944e9809ca7e80fa760f52eee53f562245da5804 (patch)
tree976fa5727a20732568db40ec49f528f1d3d81107
parentc759b63d1814a9046424c6015c55d6a207c1534a (diff)
downloadportage-944e9809ca7e80fa760f52eee53f562245da5804.tar.gz
portage-944e9809ca7e80fa760f52eee53f562245da5804.tar.bz2
portage-944e9809ca7e80fa760f52eee53f562245da5804.zip
Use setdefault to avoid an extra dict lookup.
svn path=/main/trunk/; revision=4733
-rwxr-xr-xbin/emerge5
1 files changed, 1 insertions, 4 deletions
diff --git a/bin/emerge b/bin/emerge
index 604b97601..44e059a3c 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -3638,10 +3638,7 @@ def action_depclean(settings, trees, ldpath_mtimes,
pkgs = vardb.match(atom)
if not pkgs:
if not atom.startswith("!") and priority == hard:
- if atom in unresolveable:
- unresolveable[atom].append(parent)
- else:
- unresolveable[atom] = [parent]
+ unresolveable.setdefault(atom, []).append(parent)
continue
# Could put slot checking here to ensure that there aren't two
# packages with the same slot...