Fix an incorrect positional check in *DEPEND parsing.
authorJason Stubbs <jstubbs@gentoo.org>
Wed, 21 Dec 2005 14:46:37 +0000 (14:46 -0000)
committerJason Stubbs <jstubbs@gentoo.org>
Wed, 21 Dec 2005 14:46:37 +0000 (14:46 -0000)
svn path=/main/trunk/; revision=2418

pym/portage_dep.py

index 93d0049e7039e8e3aca2b47cd52f6692c1593959..287366734a7c4fa8e994b46ca5736bdebabb7880 100644 (file)
@@ -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: