diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-01-18 20:48:15 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-01-18 20:48:15 +0000 |
commit | 4fdc0ee324b049d18dbb689587193dacd5150ca1 (patch) | |
tree | 4b9375c8eccc8b9143eb1834a46e27ea5501b3fb | |
parent | e402103396709dabbb38f7ae0a6707fc6a0477f3 (diff) | |
download | portage-4fdc0ee324b049d18dbb689587193dacd5150ca1.tar.gz portage-4fdc0ee324b049d18dbb689587193dacd5150ca1.tar.bz2 portage-4fdc0ee324b049d18dbb689587193dacd5150ca1.zip |
Raise an informative InvalidData exception instead of 'TypeError: unsubscriptable object' when pkgsplit returns None.
svn path=/main/trunk/; revision=5714
-rw-r--r-- | pym/portage_dep.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pym/portage_dep.py b/pym/portage_dep.py index b13569822..bf40452ac 100644 --- a/pym/portage_dep.py +++ b/pym/portage_dep.py @@ -607,6 +607,8 @@ def match_from_list(mydep, candidate_list): elif operator == "~": # version, any revision, match for x in candidate_list: xs = catpkgsplit(x) + if xs is None: + raise InvalidData(x) if not cpvequal(xs[0]+"/"+xs[1]+"-"+xs[2], mycpv_cps[0]+"/"+mycpv_cps[1]+"-"+mycpv_cps[2]): continue if xs[2] != ver: |