summaryrefslogtreecommitdiffstats
path: root/pym/portage_dep.py
diff options
context:
space:
mode:
Diffstat (limited to 'pym/portage_dep.py')
-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 93d0049e7..287366734 100644
--- a/pym/portage_dep.py
+++ b/pym/portage_dep.py
@@ -63,7 +63,7 @@ def use_reduce(deparray, uselist=[], masklist=[], matchall=0, excludeall=[]):
# Quick validity checks
for x in range(len(deparray)):
if deparray[x] in ["||","&&"]:
- if len(deparray) == x:
+ if len(deparray) - 1 == x:
# Operator is the last element
raise portage_exception.InvalidDependString("INVALID "+deparray[x]+" DEPEND STRING: "+str(deparray))
if type(deparray[x+1]) != types.ListType: