From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id B1EEA1387FD for ; Thu, 27 Mar 2014 12:22:08 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 30D07E0BF4; Thu, 27 Mar 2014 12:22:08 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id AF758E0BF1 for ; Thu, 27 Mar 2014 12:22:07 +0000 (UTC) Received: from hackintosh.gkp-asp.local (unknown [195.254.219.2]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: bernalex) by smtp.gentoo.org (Postfix) with ESMTPSA id 507A633EB22 for ; Thu, 27 Mar 2014 12:22:06 +0000 (UTC) From: Alexander Berntsen To: gentoo-portage-dev@lists.gentoo.org Subject: [gentoo-portage-dev] [PATCH] depgraph: Skip atoms that are None (bug 505944) Date: Thu, 27 Mar 2014 13:21:03 +0100 Message-Id: <1395922863-7944-1-git-send-email-bernalex@gentoo.org> X-Mailer: git-send-email 1.8.3.2 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org X-Archives-Salt: 596d6653-fc77-4e92-898e-a134ccb5d6ba X-Archives-Hash: 0f7191a9b1979bb97921bcef5f3d6599 Don't try to display atoms that are None when in debug mode. --- Can I get an ACK on this please? Do share your ideas for refactoring, if any. But even if this is not how we want it to work in the end, I still think we should commit it to fix the bug. pym/_emerge/depgraph.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index abb70a7..556cb08 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -2211,12 +2211,13 @@ class depgraph(object): # Display the specific atom from SetArg or # Package types. uneval = "" - if dep.atom is not dep.atom.unevaluated_atom: - uneval = " (%s)" % (dep.atom.unevaluated_atom,) - writemsg_level( - "%s%s%s required by %s\n" % - ("Parent Dep:".ljust(15), dep.atom, uneval, myparent), - level=logging.DEBUG, noiselevel=-1) + if dep.atom is not None: + if dep.atom is not dep.atom.unevaluated_atom: + uneval = " (%s)" % (dep.atom.unevaluated_atom,) + writemsg_level( + "%s%s%s required by %s\n" % + ("Parent Dep:".ljust(15), dep.atom, uneval, myparent), + level=logging.DEBUG, noiselevel=-1) # Ensure that the dependencies of the same package # are never processed more than once. -- 1.8.3.2