From 09723e69661cca39e2d045aeb40f96a30ba93841 Mon Sep 17 00:00:00 2001 From: Trygve Date: Sun, 27 Mar 2022 19:18:51 +0200 Subject: [PATCH] =?UTF-8?q?Fiksa=20at=20f=C3=B8rste=20linje=20i=20mtr=20fi?= =?UTF-8?q?la=20ble=20hoppa=20over?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- otime.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/otime.py b/otime.py index b5444b3..8e3dd7a 100644 --- a/otime.py +++ b/otime.py @@ -214,11 +214,8 @@ class card_punch: def list_from_mtr_f(mtr_f): csvreader = csv.reader(open(mtr_f)) - fields = next(csvreader) - fields = [] rows = [] - cards = [] # hver rad er brikkenummer med tilhørende info for row in csvreader: @@ -287,7 +284,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').readlines() + conf = open(ttime_file, 'r', encoding='latin_1').readlines() for line in conf: if '-courses' in line: raw_courselist = re.search(r'(?<=\")(.*?)(?=\")', line).group().split(';')