get_dep_chain: fix KeyError if start_node is root
authorZac Medico <zmedico@gentoo.org>
Sun, 18 Sep 2011 21:57:08 +0000 (14:57 -0700)
committerZac Medico <zmedico@gentoo.org>
Sun, 18 Sep 2011 21:57:08 +0000 (14:57 -0700)
pym/_emerge/depgraph.py

index 400207e4efa578362f3d151c4f629751ee4262b9..deda441571451793d56f6279d5d94306a53e807a 100644 (file)
@@ -2704,7 +2704,7 @@ class depgraph(object):
                traversed_nodes.add(start_node)
 
                start_node_parent_atoms = {}
-               for ppkg, patom in all_parents[node]:
+               for ppkg, patom in all_parents.get(node, []):
                        # Get a list of suitable atoms. For use deps
                        # (aka unsatisfied_dependency is not None) we
                        # need that the start_node doesn't match the atom.