metrics: fix time regex (#81)

This commit is contained in:
Pierre Carrier
2024-10-24 16:45:42 +02:00
committed by GitHub
parent 05b317f151
commit 924e0fcd17

View File

@@ -434,7 +434,7 @@ def check_line_number(file_path, line_number):
# check if file_path exists
if file_path is None or not os.path.isfile(file_path):
return 0.
timeRegex = "([01]\d|2[0-3]):[0-5]\d:[0-5]\d"
timeRegex = "([01]\\d|2[0-3]):[0-5]\\d:([0-5]\\d|60)"
# check if the string that matches the timeRegex in this txt file equals to line_number["expected"]
try:
with open(file_path, 'r') as f: