summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage/versions.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pym/portage/versions.py b/pym/portage/versions.py
index 89ab6e180..1db421a7e 100644
--- 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):