From: "Zac Medico (zmedico)" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] portage r10510 - main/branches/2.1.2/pym
Date: Fri, 30 May 2008 21:20:12 +0000 [thread overview]
Message-ID: <E1K2C1E-0002Mw-ND@stork.gentoo.org> (raw)
Author: zmedico
Date: 2008-05-30 21:20:11 +0000 (Fri, 30 May 2008)
New Revision: 10510
Modified:
main/branches/2.1.2/pym/portage.py
Log:
Now that dbapi._iter_match() is guaranteed to return a real iterator with
a next() method, we can just call next() and handle StopIteration.
(trunk r10509)
Modified: main/branches/2.1.2/pym/portage.py
===================================================================
--- main/branches/2.1.2/pym/portage.py 2008-05-30 21:14:32 UTC (rev 10509)
+++ main/branches/2.1.2/pym/portage.py 2008-05-30 21:20:11 UTC (rev 10510)
@@ -7879,10 +7879,10 @@
cpv_iter = iter(self.cp_list(mykey))
if mydep != mykey:
cpv_iter = self._iter_match(mydep, cpv_iter)
- myval = ""
- for cpv in cpv_iter:
- myval = cpv
- break
+ try:
+ myval = cpv_iter.next()
+ except StopIteration:
+ myval = ""
elif level in ("minimum-visible", "bestmatch-visible"):
# Find the minimum matching visible version. This is optimized to
--
gentoo-commits@lists.gentoo.org mailing list
reply other threads:[~2008-05-30 21:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=E1K2C1E-0002Mw-ND@stork.gentoo.org \
--to=zmedico@gentoo.org \
--cc=gentoo-commits@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