Stopper strekktider når målpost er nådd
This commit is contained in:
parent
af8bd3a31c
commit
c15fd70cf2
5
otime.py
5
otime.py
@ -102,10 +102,13 @@ class event:
|
||||
xml_child(result, 'Position', n.rank(self.runners))
|
||||
xml_child(result, 'Status', n.status())
|
||||
#<SplitTime>
|
||||
#TODO: ta utgangspunkt i løypa, ikke det brikka har stempla
|
||||
for code,split in zip(n.card_r.controls,n.card_r.splits):
|
||||
st = ET.SubElement(result, 'SplitTime')
|
||||
xml_child(st, 'ControlCode', code)
|
||||
xml_child(st, 'Time', split)
|
||||
if code == n.o_class.course.codes[-1]:
|
||||
break
|
||||
#</SplitTime>
|
||||
elif n.status() == 'Disqualified':
|
||||
xml_child(result, 'Status', n.status())
|
||||
@ -284,7 +287,7 @@ def courses_from_ttime_conf(ttime_file = 'sc_2021_ttime/ttime.cnf.txt'):
|
||||
return courses
|
||||
def classes_from_ttime_conf(ttime_file, courses):
|
||||
o_classes = []
|
||||
conf = open(ttime_file, 'r', encoding='latin_1').readlines()
|
||||
conf = open(ttime_file, 'r').readlines()
|
||||
for line in conf:
|
||||
if '-courses' in line:
|
||||
raw_courselist = re.search(r'(?<=\")(.*?)(?=\")', line).group().split(';')
|
||||
|
Loading…
Reference in New Issue
Block a user