Commit 35306c75 authored by Heiko Becker's avatar Heiko Becker

Fix bug in conversion script

parent dd47e465
......@@ -6,7 +6,7 @@ def parseTime (timeStr):
timeL = timeStr.split(":")
time_sec_micro = timeL [len(timeL)-1].split(".")
timeL.pop(len(timeL)-1)
#We have already taken away the seoncds and microseconds value --> start with minutes
#We have already taken away the seoncds and microseconds value --> start with minutes
multiplier = 60
res = 0
for val in reversed(timeL):
......@@ -17,8 +17,9 @@ def parseTime (timeStr):
res += int(time_sec_micro[0])
#Round to next second
if (int (time_sec_micro[1]) > 0):
res += 1
if (len (time_sec_micro) > 1):
if (int (time_sec_micro[1]) > 0):
res += 1
return res
......@@ -36,7 +37,7 @@ def convert (fname):
if "certificate" in val:
val = val.replace(".v","").replace(".sig","")
lineContent = val.split("certificate_")
curr_line += str(lineContent[len(lineContent) - 1])
curr_line += str(lineContent[len(lineContent) - 1])
curr_line += ", " + str(timeInSeconds) + "\n"
out.write (curr_line)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment