summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/sets/base.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pym/portage/sets/base.py b/pym/portage/sets/base.py
index 3f85965bc..2ae4723fb 100644
--- a/pym/portage/sets/base.py
+++ b/pym/portage/sets/base.py
@@ -105,10 +105,10 @@ class PackageSet(object):
None if there are no matches. This matches virtual arguments against
the PROVIDE metadata. This can raise an InvalidDependString exception
if an error occurs while parsing PROVIDE."""
- atoms = list(self.iterAtomsForPackage(pkg))
- if not atoms:
+ try:
+ return self.iterAtomsForPackage(pkg).next()
+ except StopIteration:
return None
- return best_match_to_list(pkg, atoms)
def iterAtomsForPackage(self, pkg):
"""