From 987b05f60c6eec2fc867fe1db2e8e9089c166a76 Mon Sep 17 00:00:00 2001 From: Kyle Hippe Date: Wed, 29 May 2024 15:16:06 -0500 Subject: [PATCH] If blank checkpoint files are present, the timer will try to parse None matches --- pdfwf/timer.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pdfwf/timer.py b/pdfwf/timer.py index c7b33fe..cf498c7 100644 --- a/pdfwf/timer.py +++ b/pdfwf/timer.py @@ -148,6 +148,9 @@ def parse_logs(self, log_path: PathLike) -> list[TimeStats]: # Extracted items from all print statements for line in lines: match = re.findall(regex_pattern, line) + # If the line doesn't contain the timer information, skip it + if not match: + continue time_stats.append( TimeStats( tags=match[1].split(),