projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2339fbb
)
Make cpv_getversion handle invalid cpv and add cpv_getversion to __all__.
author
Zac Medico
<zmedico@gentoo.org>
Sat, 10 Apr 2010 21:11:47 +0000
(14:11 -0700)
committer
Zac Medico
<zmedico@gentoo.org>
Sat, 10 Apr 2010 21:11:47 +0000
(14:11 -0700)
pym/portage/versions.py
patch
|
blob
|
history
diff --git
a/pym/portage/versions.py
b/pym/portage/versions.py
index 89ab6e180eb215844c9b884863e8c891f4b0ba75..1db421a7e9837a910d8c4759d401469d60fe1ceb 100644
(file)
--- a/
pym/portage/versions.py
+++ b/
pym/portage/versions.py
@@
-4,7
+4,7
@@
__all__ = [
'best', 'catpkgsplit', 'catsplit',
- 'cpv_getkey', 'pkgcmp', 'pkgsplit',
+ 'cpv_getkey', '
cpv_getversion', '
pkgcmp', 'pkgsplit',
'ververify', 'vercmp'
]
@@
-338,6
+338,8
@@
def cpv_getkey(mycpv):
def cpv_getversion(mycpv):
"""Returns the v (including revision) from an cpv."""
cp = cpv_getkey(mycpv)
+ if cp is None:
+ return None
return mycpv[len(cp+"-"):]
def catsplit(mydep):