summaryrefslogtreecommitdiffstats
path: root/pym/portage_dep.py
diff options
context:
space:
mode:
authorAlec Warner <antarus@gentoo.org>2007-01-11 21:38:32 +0000
committerAlec Warner <antarus@gentoo.org>2007-01-11 21:38:32 +0000
commit28ae3c3314f3df05116df51c76df4150f913aceb (patch)
treedce625a09574b2ab3c858931f3a2a4dfbbd5ce7c /pym/portage_dep.py
parentda67328341fef2cc4d9e85be0694aad113b30c0a (diff)
downloadportage-28ae3c3314f3df05116df51c76df4150f913aceb.tar.gz
portage-28ae3c3314f3df05116df51c76df4150f913aceb.tar.bz2
portage-28ae3c3314f3df05116df51c76df4150f913aceb.zip
Handle the exception in isvalidatom, change it to use a portage exceptoin, thanks to Zac for pointing this out
svn path=/main/trunk/; revision=5571
Diffstat (limited to 'pym/portage_dep.py')
-rw-r--r--pym/portage_dep.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/pym/portage_dep.py b/pym/portage_dep.py
index 34eb8f33d..56c923886 100644
--- a/pym/portage_dep.py
+++ b/pym/portage_dep.py
@@ -20,6 +20,7 @@
import re, string, sys, types
import portage_exception
+from portage_exception import InvalidData
from portage_versions import catpkgsplit, catsplit, pkgcmp, pkgsplit, ververify
def cpvequal(cpv1, cpv2):
@@ -359,7 +360,10 @@ def isvalidatom(atom, allow_blockers=False):
return 0
if allow_blockers and atom.startswith("!"):
atom = atom[1:]
- mycpv_cps = catpkgsplit(dep_getcpv(atom))
+ try:
+ mycpv_cps = catpkgsplit(dep_getcpv(atom))
+ except InvalidData:
+ return 0
operator = get_operator(atom)
if operator:
if operator[0] in "<>" and atom[-1] == "*":