From 7502324ea6d85f96b251973014684cba5251d973 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 24 May 2008 21:00:07 +0000 Subject: 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 --- pym/portage/dep.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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] == "?": -- cgit v1.2.3-1-g7c22