diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-03-05 05:08:00 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-03-05 05:08:00 +0000 |
commit | 4097acb57e6f1f2c59907cb82eefeb6b6efa24ca (patch) | |
tree | 8c83a7611a7e6b721909ef4fe8c839b110ee3de4 | |
parent | 7a0ef076761ee1dd6e41765f608071ede1b70ba8 (diff) | |
download | portage-4097acb57e6f1f2c59907cb82eefeb6b6efa24ca.tar.gz portage-4097acb57e6f1f2c59907cb82eefeb6b6efa24ca.tar.bz2 portage-4097acb57e6f1f2c59907cb82eefeb6b6efa24ca.zip |
Use enumerate() inside use_reduce() validation code.
svn path=/main/trunk/; revision=12758
-rw-r--r-- | pym/portage/dep.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pym/portage/dep.py b/pym/portage/dep.py index 48465ddbe..0bff1104c 100644 --- a/pym/portage/dep.py +++ b/pym/portage/dep.py @@ -216,8 +216,8 @@ def use_reduce(deparray, uselist=[], masklist=[], matchall=0, excludeall=[]): @return: The use reduced depend array """ # Quick validity checks - for x in range(len(deparray)): - if deparray[x] in ["||","&&"]: + for x, y in enumerate(deparray): + if y == '||': if len(deparray) - 1 == x or not isinstance(deparray[x+1], list): raise portage.exception.InvalidDependString(deparray[x]+" missing atom list in \""+paren_enclose(deparray)+"\"") if deparray and deparray[-1] and deparray[-1][-1] == "?": |