logger: use next() to iterate over log lines (#36515)

This commit is contained in:
Frédéric Péters 2019-11-16 15:29:18 +01:00
parent 158d6fac2d
commit 228053c9ce
1 changed files with 3 additions and 3 deletions

View File

@ -98,16 +98,16 @@ def parse_logstream(stream):
non-blank character continue until the lines does not start with a blank
character
'''
line = stream.next()
line = next(stream)
while True:
r = readline(line)
try:
# Skip badly formatted lines
if r is None:
line = stream.next()
line = next(stream)
continue
while True:
line = stream.next()
line = next(stream)
if line.startswith(' '):
# Append the line without the first blank
r['message'] = r['message'] + line[1:]