diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-08-13 05:35:00 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-08-13 05:35:00 +0000 |
commit | 3ad8559b4158ec110665f5f8baed0d364e73e9ad (patch) | |
tree | d49071ed485d50758d933dab4fec85be5244e0c4 | |
parent | ac83cade5511ab84e2ce96e7204347c01d23886d (diff) | |
download | portage-3ad8559b4158ec110665f5f8baed0d364e73e9ad.tar.gz portage-3ad8559b4158ec110665f5f8baed0d364e73e9ad.tar.bz2 portage-3ad8559b4158ec110665f5f8baed0d364e73e9ad.zip |
Make stack_dictlist return an empty dictionary when there is nothing to stack. See bug #143730.
svn path=/main/trunk/; revision=4240
-rw-r--r-- | pym/portage_util.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/pym/portage_util.py b/pym/portage_util.py index e159c3766..54d221d8f 100644 --- a/pym/portage_util.py +++ b/pym/portage_util.py @@ -80,12 +80,10 @@ def stack_dictlist(original_dicts, incremental=0, incrementals=[], ignore_none=0 """Stacks an array of dict-types into one array. Optionally merging or overwriting matching key/value pairs for the dict[key]->list. Returns a single dict. Higher index in lists is preferenced.""" - final_dict = None + final_dict = {} for mydict in original_dicts: if mydict is None: continue - if final_dict is None: - final_dict = {} for y in mydict.keys(): if not final_dict.has_key(y): final_dict[y] = [] |