diff options
author | 2008-05-25 04:19:38 +0000 | |
---|---|---|
committer | 2008-05-25 04:19:38 +0000 | |
commit | 5e39470e1d14bf9cca26bc955354f409ddd8b2d4 (patch) | |
tree | 4c08f62675bf02c3f06f28dbbe393f8174e184b8 /pym | |
parent | Bug #223417 - Make the vardbapi.cpv_all() use_cache parameter useful (diff) | |
download | portage-5e39470e1d14bf9cca26bc955354f409ddd8b2d4.tar.gz portage-5e39470e1d14bf9cca26bc955354f409ddd8b2d4.tar.bz2 portage-5e39470e1d14bf9cca26bc955354f409ddd8b2d4.zip |
Fix use_reduce() so that it appropriately raises an InvalidDependString
instead of an IndexError in some cases (avoid IndexError by using slice
notation). (trunk r10391)
svn path=/main/branches/2.1.2/; revision=10407
Diffstat (limited to 'pym')
-rw-r--r-- | pym/portage_dep.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pym/portage_dep.py b/pym/portage_dep.py index 26737d618..4fb6ddde9 100644 --- a/pym/portage_dep.py +++ b/pym/portage_dep.py @@ -175,7 +175,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] == "?": |