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
|
non-blank character continue until the lines does not start with a blank
|
||||||
character
|
character
|
||||||
'''
|
'''
|
||||||
line = stream.next()
|
line = next(stream)
|
||||||
while True:
|
while True:
|
||||||
r = readline(line)
|
r = readline(line)
|
||||||
try:
|
try:
|
||||||
# Skip badly formatted lines
|
# Skip badly formatted lines
|
||||||
if r is None:
|
if r is None:
|
||||||
line = stream.next()
|
line = next(stream)
|
||||||
continue
|
continue
|
||||||
while True:
|
while True:
|
||||||
line = stream.next()
|
line = next(stream)
|
||||||
if line.startswith(' '):
|
if line.startswith(' '):
|
||||||
# Append the line without the first blank
|
# Append the line without the first blank
|
||||||
r['message'] = r['message'] + line[1:]
|
r['message'] = r['message'] + line[1:]
|
||||||
|
|
Loading…
Reference in New Issue