From 228053c9ce2da77cc9d6deec770f23b52807202b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Sat, 16 Nov 2019 15:29:18 +0100 Subject: [PATCH] logger: use next() to iterate over log lines (#36515) --- wcs/qommon/logger.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wcs/qommon/logger.py b/wcs/qommon/logger.py index 54559634f..8c9978a55 100644 --- a/wcs/qommon/logger.py +++ b/wcs/qommon/logger.py @@ -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:]