summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-05-24 21:00:07 +0000
committerZac Medico <zmedico@gentoo.org>2008-05-24 21:00:07 +0000
commit7502324ea6d85f96b251973014684cba5251d973 (patch)
tree8b5c006b9dd031763d2e40d89f265cd17854f821 /pym
parent522b31e2198a5c4a717b38273b61cc8ff3d98dfb (diff)
downloadportage-7502324ea6d85f96b251973014684cba5251d973.tar.gz
portage-7502324ea6d85f96b251973014684cba5251d973.tar.bz2
portage-7502324ea6d85f96b251973014684cba5251d973.zip
Fix use_reduce() so that it appropriately raises an InvalidDependString
instead of an IndexError in some cases (avoid IndexError by using slice notation). svn path=/main/trunk/; revision=10391
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/dep.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pym/portage/dep.py b/pym/portage/dep.py
index 267b356fb..998abfee7 100644
--- a/pym/portage/dep.py
+++ b/pym/portage/dep.py
@@ -230,7 +230,7 @@ def use_reduce(deparray, uselist=[], masklist=[], matchall=0, excludeall=[]):
rlist.append([])
else:
- if head[-1] == "?": # Use reduce next group on fail.
+ if head[-1:] == "?": # Use reduce next group on fail.
# Pull any other use conditions and the following atom or list into a separate array
newdeparray = [head]
while isinstance(newdeparray[-1], str) and newdeparray[-1][-1] == "?":