From af8bd3a31c952a40cfb6f6e518a450b3094a6a2f Mon Sep 17 00:00:00 2001 From: Trygve Date: Sat, 26 Mar 2022 22:18:05 +0100 Subject: [PATCH] =?UTF-8?q?Sm=C3=A5ting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- otime.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/otime.py b/otime.py index f002732..0ef888e 100644 --- a/otime.py +++ b/otime.py @@ -150,6 +150,7 @@ class runner: card = int(tt_line[6]) except: card = 0 + runner_o_class = None try: raw_class_str = tt_line[3] except: @@ -170,7 +171,7 @@ class runner: return '{} {}'.format(self.first, self.last) def check_codes(self): # 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): f_control = self.o_class.course.codes[-1] try: @@ -289,8 +290,8 @@ def classes_from_ttime_conf(ttime_file, courses): raw_courselist = re.search(r'(?<=\")(.*?)(?=\")', line).group().split(';') loops = 0 for n in raw_courselist: - n = n.split(',') - for i in n: + split = n.split(',') + for i in split: o_classes.append(o_class(i,courses[loops])) loops += 1