This commit is contained in:
Trygve 2022-03-26 22:18:05 +01:00
parent 6289690149
commit af8bd3a31c

View File

@ -150,6 +150,7 @@ class runner:
card = int(tt_line[6]) card = int(tt_line[6])
except: except:
card = 0 card = 0
runner_o_class = None
try: try:
raw_class_str = tt_line[3] raw_class_str = tt_line[3]
except: except:
@ -170,7 +171,7 @@ class runner:
return '{} {}'.format(self.first, self.last) return '{} {}'.format(self.first, self.last)
def check_codes(self): def check_codes(self):
# Returns False if not ok and touple if ok # Returns False if not ok and touple if ok
return contains(self.o_class.course.codes, list(self.card_r.controls)) return contains(self.o_class.course.codes, list(self.card_r.controls))
def totaltime(self): def totaltime(self):
f_control = self.o_class.course.codes[-1] f_control = self.o_class.course.codes[-1]
try: try:
@ -289,8 +290,8 @@ def classes_from_ttime_conf(ttime_file, courses):
raw_courselist = re.search(r'(?<=\")(.*?)(?=\")', line).group().split(';') raw_courselist = re.search(r'(?<=\")(.*?)(?=\")', line).group().split(';')
loops = 0 loops = 0
for n in raw_courselist: for n in raw_courselist:
n = n.split(',') split = n.split(',')
for i in n: for i in split:
o_classes.append(o_class(i,courses[loops])) o_classes.append(o_class(i,courses[loops]))
loops += 1 loops += 1