summaryrefslogtreecommitdiffstats
path: root/ipapython/install
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 /ipapython/install
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 'ipapython/install')
-rw-r--r--ipapython/install/core.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/ipapython/install/core.py b/ipapython/install/core.py
index dac8883fe..92ad12c7f 100644
--- a/ipapython/install/core.py
+++ b/ipapython/install/core.py
@@ -319,14 +319,14 @@ class Configurable(object):
def run_until_executing(self, gen):
while self.__state != _EXECUTE_RUNNING:
try:
- yield gen.next()
+ yield next(gen)
except StopIteration:
break
def __runner(self, pending_state, running_state):
self.__transition(pending_state, running_state)
- step = self.__gen.next
+ step = lambda: next(self.__gen)
while True:
try:
step()
@@ -356,7 +356,7 @@ class Configurable(object):
exc_info = sys.exc_info()
step = lambda: self.__gen.throw(*exc_info)
else:
- step = self.__gen.next
+ step = lambda: next(self.__gen)
def _handle_exception(self, exc_info):
assert not hasattr(super(Configurable, self), '_handle_exception')
@@ -498,7 +498,7 @@ class Composite(Configurable):
new_validate = []
for child, validator in validate:
try:
- validator.next()
+ next(validator)
except StopIteration:
if child.done():
self.__components.remove(child)
@@ -520,7 +520,7 @@ class Composite(Configurable):
new_execute = []
for child, executor in execute:
try:
- executor.next()
+ next(executor)
except StopIteration:
pass
else: