From b9faad3ed1c94a393321423582f28d6a244a3c60 Mon Sep 17 00:00:00 2001 From: Pavel 'LEdoian' Turinsky Date: Sat, 14 Jan 2023 06:33:47 +0100 Subject: [PATCH] =?UTF-8?q?2.=20kolo=20(Uk=C3=A1zka=20pro=20rok=202018)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- poc2018.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/poc2018.py b/poc2018.py index 785460d..9277c67 100755 --- a/poc2018.py +++ b/poc2018.py @@ -54,11 +54,11 @@ def get_results() -> Vysledek: for kandidat in root.findall(rf'./{NS}CR/{NS}KANDIDAT'): ka = kandidat.attrib jmeno = f'{ka[r"JMENO"]} {ka[r"PRIJMENI"]}' - hlasy = int(ka[r'HLASY_1KOLO']) + hlasy = int(ka.get(r'HLASY_2KOLO', 0)) kandidati[jmeno] = hlasy for ucast in root.findall(rf'./{NS}CR/{NS}UCAST'): - if ucast.attrib[r'KOLO'] == '1': + if ucast.attrib[r'KOLO'] == '2': fucast = ucast.attrib return Vysledek(kandidati=kandidati, timestamp=timestamp, ucast=fucast) @@ -85,7 +85,7 @@ def plot(ts, kand): 'Petr Hannig', 'Vratislav Kulhánek', 'NEPLATNÉ', - 'NEVOLILI', + #'NEVOLILI', 'NEZAPOČÍTANÉ', ) x = [kand[i] for i in order]