projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f7e9390
)
Make best() return early when it's only given one package. (trunk r7664)
author
Zac Medico
<zmedico@gentoo.org>
Wed, 22 Aug 2007 21:37:34 +0000
(21:37 -0000)
committer
Zac Medico
<zmedico@gentoo.org>
Wed, 22 Aug 2007 21:37:34 +0000
(21:37 -0000)
svn path=/main/branches/2.1.2/; revision=7668
pym/portage_versions.py
patch
|
blob
|
history
diff --git
a/pym/portage_versions.py
b/pym/portage_versions.py
index 91b8cc1648ed4d7c63a8bd08d47e6c92930eb1a4..cf8d20d4f68d829a3db548b58d7a5f1c52a0669c 100644
(file)
--- a/
pym/portage_versions.py
+++ b/
pym/portage_versions.py
@@
-311,10
+311,10
@@
def catsplit(mydep):
def best(mymatches):
"""Accepts None arguments; assumes matches are valid."""
- if mymatches is None:
- return ""
- if not len(mymatches):
+ if not mymatches:
return ""
+ if len(mymatches) == 1:
+ return mymatches[0]
bestmatch = mymatches[0]
p2 = catpkgsplit(bestmatch)[1:]
for x in mymatches[1:]: