logger: use next() to iterate over log lines (#36515)
This commit is contained in:
parent
158d6fac2d
commit
228053c9ce
|
@ -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:]
|
||||
|
|
Loading…
Reference in New Issue