metrics: fix time regex (#81)
This commit is contained in:
@@ -434,7 +434,7 @@ def check_line_number(file_path, line_number):
|
|||||||
# check if file_path exists
|
# check if file_path exists
|
||||||
if file_path is None or not os.path.isfile(file_path):
|
if file_path is None or not os.path.isfile(file_path):
|
||||||
return 0.
|
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"]
|
# check if the string that matches the timeRegex in this txt file equals to line_number["expected"]
|
||||||
try:
|
try:
|
||||||
with open(file_path, 'r') as f:
|
with open(file_path, 'r') as f:
|
||||||
|
|||||||
Reference in New Issue
Block a user