In show_invalid_depstring_notice(), use normal Package attributes
authorZac Medico <zmedico@gentoo.org>
Sun, 5 Sep 2010 06:59:13 +0000 (23:59 -0700)
committerZac Medico <zmedico@gentoo.org>
Sun, 5 Sep 2010 06:59:13 +0000 (23:59 -0700)
instead of the old Task.__getitem__() approach that relies on
the values inside the hash key.

pym/_emerge/show_invalid_depstring_notice.py

index 02fba03d0a78d1cc0a985f453338a999f703668b..6ab7727f024cbedd06a91ac06084229b08f2dc1f 100644 (file)
@@ -11,9 +11,9 @@ def show_invalid_depstring_notice(parent_node, depstring, error_msg):
 
        msg1 = "\n\n!!! Invalid or corrupt dependency specification: " + \
                "\n\n%s\n\n%s\n\n" % (error_msg, parent_node)
-       p_type = parent_node[0]
-       p_key = parent_node[2]
-       p_status = parent_node[3]
+       p_type = parent_node.type_name
+       p_key = parent_node.cpv
+       p_status = parent_node.operation
        msg = []
        if p_status == "nomerge":
                category, pf = portage.catsplit(p_key)