Handle a KeyError in depgraph._ordered_tree_display(), reported on irc by
authorZac Medico <zmedico@gentoo.org>
Fri, 27 Nov 2009 22:38:53 +0000 (22:38 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 27 Nov 2009 22:38:53 +0000 (22:38 -0000)
romildo. (trunk r14901)

svn path=/main/branches/2.1.7/; revision=14906

pym/_emerge/depgraph.py

index 684775296a0996f5bda23b81dde4c123898cf9a5..f8775c6d561e21fc634882aec6520051f3967298 100644 (file)
@@ -4691,7 +4691,11 @@ class depgraph(object):
                                        # an argument or a direct member of a set that has
                                        # been specified as an argument (system or world).
                                        if current_node not in self._dynamic_config._set_nodes:
-                                               parent_nodes = mygraph.parent_nodes(current_node)
+                                               try:
+                                                       parent_nodes = mygraph.parent_nodes(current_node)
+                                               except KeyError:
+                                                       # This can happen sometimes for blockers.
+                                                       pass
                                        if parent_nodes:
                                                child_nodes = set(mygraph.child_nodes(current_node))
                                                selected_parent = None