From: Alexander Berntsen <bernalex@gentoo.org>
To: gentoo-portage-dev@lists.gentoo.org
Subject: Re: [gentoo-portage-dev] [PATCH] depgraph: Skip atoms that are None (bug 505944)
Date: Fri, 28 Mar 2014 10:07:49 +0100 [thread overview]
Message-ID: <53353BE5.4080804@gentoo.org> (raw)
In-Reply-To: <20140327091608.46339c1d.dolsen@gentoo.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On 27/03/14 17:16, Brian Dolbec wrote:
> diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
> index 83035c2..61ef31d 100644 --- a/pym/_emerge/depgraph.py +++
> b/pym/_emerge/depgraph.py @@ -1942,8 +1942,9 @@ 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,) +
> if dep.atom and dep.atom.unevaluated_atom: +
> 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), lines 1-16/16 (END)
>
>
> This takes advantage of the fact that uneval is initialized to ""
> Then only reassigns it if there is actually a mismatch.
Sure. I'd use one "if" instead of two.
- --
Alexander
bernalex@gentoo.org
https://secure.plaimi.net/~alexander
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iF4EAREIAAYFAlM1O+UACgkQRtClrXBQc7XL+AD/Wn5sbE/O3QFAl7nBYblVWFAK
LBVwmY3XEOT2blgIPfIA/2a8IspgldZxO2AmLQ/bZNnFcigUPejaZ1V8J97JJuiu
=qc0Y
-----END PGP SIGNATURE-----
prev parent reply other threads:[~2014-03-28 9:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-27 12:21 [gentoo-portage-dev] [PATCH] depgraph: Skip atoms that are None (bug 505944) Alexander Berntsen
2014-03-27 16:16 ` Brian Dolbec
2014-03-28 9:07 ` Alexander Berntsen [this message]
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=53353BE5.4080804@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