From 55b2add922fc5c180dab6b51b8e061d68a9bea4c Mon Sep 17 00:00:00 2001 From: Dario Borreguero Rincon Date: Wed, 9 Oct 2024 14:45:34 +0200 Subject: [PATCH] fix #93 as per indicated in previous comments. --- src/sysdiagnose/parsers/logarchive.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sysdiagnose/parsers/logarchive.py b/src/sysdiagnose/parsers/logarchive.py index aefa17f..f059f85 100644 --- a/src/sysdiagnose/parsers/logarchive.py +++ b/src/sysdiagnose/parsers/logarchive.py @@ -217,8 +217,9 @@ def __convert_using_native_logparser(input_folder: str, output_file: str) -> lis print(f"WARNING: error parsing JSON {line}: {str(e)}") except KeyError: # last line of log does not contain 'time' field, nor the rest of the data. - # so just ignore it - pass + # so just ignore it and all the rest. + # last line looks like {'count':xyz, 'finished':1} + break def __convert_using_unifiedlogparser(input_folder: str, output_file: str) -> list: print('WARNING: using Mandiant UnifiedLogReader to parse logs, results will be less reliable than on OS X')