public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Alexander Berntsen <bernalex@gentoo.org>
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	[thread overview]
Message-ID: <1395922863-7944-1-git-send-email-bernalex@gentoo.org> (raw)

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



             reply	other threads:[~2014-03-27 12:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-27 12:21 Alexander Berntsen [this message]
2014-03-27 16:16 ` [gentoo-portage-dev] [PATCH] depgraph: Skip atoms that are None (bug 505944) Brian Dolbec
2014-03-28  9:07   ` Alexander Berntsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1395922863-7944-1-git-send-email-bernalex@gentoo.org \
    --to=bernalex@gentoo.org \
    --cc=gentoo-portage-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox