summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-09-22 21:58:38 +0000
committerZac Medico <zmedico@gentoo.org>2009-09-22 21:58:38 +0000
commit3a71ae471c39c36d411d51e8b8d826c634ee5344 (patch)
tree8427034cb60a7de4ce3bdf919d9b18c2ddbb8ebf
parent60ad62667ccdd0af6b002d60ff021d3d567da9df (diff)
downloadportage-3a71ae471c39c36d411d51e8b8d826c634ee5344.tar.gz
portage-3a71ae471c39c36d411d51e8b8d826c634ee5344.tar.bz2
portage-3a71ae471c39c36d411d51e8b8d826c634ee5344.zip
Clean up stack_dicts() a little.
svn path=/main/trunk/; revision=14387
-rw-r--r--pym/portage/util.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/pym/portage/util.py b/pym/portage/util.py
index de5254aed..d89f723c8 100644
--- a/pym/portage/util.py
+++ b/pym/portage/util.py
@@ -222,12 +222,11 @@ def stack_dicts(dicts, incremental=0, incrementals=[], ignore_none=0):
continue
if final_dict is None:
final_dict = {}
- for y in mydict:
- if True:
- if y in final_dict and (incremental or (y in incrementals)):
- final_dict[y] += " "+mydict[y][:]
- else:
- final_dict[y] = mydict[y][:]
+ for k, v in mydict.items():
+ if k in final_dict and (incremental or (k in incrementals)):
+ final_dict[k] += " " + v
+ else:
+ final_dict[k] = v
return final_dict
def stack_lists(lists, incremental=1):