mirror of
https://github.com/systemd/systemd.git
synced 2024-12-19 07:03:34 +08:00
systemd-python: fix iteration
Back in 6a58bf4135
raising stop iteration was removed from the C
code, but wasn't added in the Python counterpart.
This commit is contained in:
parent
ce39bb6909
commit
1070f974f7
@ -1005,7 +1005,6 @@ AC_MSG_RESULT([
|
|||||||
nss-myhostname: ${have_myhostname}
|
nss-myhostname: ${have_myhostname}
|
||||||
gudev: ${enable_gudev}
|
gudev: ${enable_gudev}
|
||||||
gintrospection: ${enable_introspection}
|
gintrospection: ${enable_introspection}
|
||||||
keymap: ${enable_keymap}
|
|
||||||
Python: ${have_python}
|
Python: ${have_python}
|
||||||
Python Headers: ${have_python_devel}
|
Python Headers: ${have_python_devel}
|
||||||
man pages: ${have_manpages}
|
man pages: ${have_manpages}
|
||||||
|
@ -191,18 +191,18 @@ class Reader(_Reader):
|
|||||||
"""
|
"""
|
||||||
return self
|
return self
|
||||||
|
|
||||||
if _sys.version_info >= (3,):
|
def __next__(self):
|
||||||
def __next__(self):
|
"""Part of iterator protocol.
|
||||||
"""Part of iterator protocol.
|
Returns self.get_next() or raises StopIteration.
|
||||||
Returns self.get_next().
|
"""
|
||||||
"""
|
ans = self.get_next()
|
||||||
return self.get_next()
|
if ans:
|
||||||
else:
|
return ans
|
||||||
def next(self):
|
else:
|
||||||
"""Part of iterator protocol.
|
raise StopIteration()
|
||||||
Returns self.get_next().
|
|
||||||
"""
|
if _sys.version_info < (3,):
|
||||||
return self.get_next()
|
next = __next__
|
||||||
|
|
||||||
def add_match(self, *args, **kwargs):
|
def add_match(self, *args, **kwargs):
|
||||||
"""Add one or more matches to the filter journal log entries.
|
"""Add one or more matches to the filter journal log entries.
|
||||||
|
Loading…
Reference in New Issue
Block a user