summaryrefslogtreecommitdiffstats
path: root/ipalib/aci.py
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2015-08-12 12:46:22 +0200
committerJan Cholasta <jcholast@redhat.com>2015-09-01 11:42:01 +0200
commitfb7943dab454f358316160b4baf99075603a162d (patch)
tree331971db2fa50c80edccd7c2e0d3b2d05d5467cd /ipalib/aci.py
parentace63f4ea55643cb99aaa444d216a6bb9ebb1ed3 (diff)
downloadfreeipa-fb7943dab454f358316160b4baf99075603a162d.tar.gz
freeipa-fb7943dab454f358316160b4baf99075603a162d.tar.xz
freeipa-fb7943dab454f358316160b4baf99075603a162d.zip
Use next() function on iterators
In Python 3, next() for iterators is a function rather than method. Reviewed-By: Christian Heimes <cheimes@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Diffstat (limited to 'ipalib/aci.py')
-rwxr-xr-xipalib/aci.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/ipalib/aci.py b/ipalib/aci.py
index 3019375c1..186b2e80c 100755
--- a/ipalib/aci.py
+++ b/ipalib/aci.py
@@ -107,17 +107,17 @@ class ACI:
for token in lexer:
# We should have the form (a = b)(a = b)...
if token == "(":
- var = lexer.next().strip()
- operator = lexer.next()
+ var = next(lexer).strip()
+ operator = next(lexer)
if operator != "=" and operator != "!=":
# Peek at the next char before giving up
- operator = operator + lexer.next()
+ operator = operator + next(lexer)
if operator != "=" and operator != "!=":
raise SyntaxError("No operator in target, got '%s'" % operator)
op = operator
- val = lexer.next().strip()
+ val = next(lexer).strip()
val = self._remove_quotes(val)
- end = lexer.next()
+ end = next(lexer)
if end != ")":
raise SyntaxError('No end parenthesis in target, got %s' % end)