From 052a06741f7ccd6db395152b855a72a4a6d3b684 Mon Sep 17 00:00:00 2001 From: Trygve Date: Sun, 13 Mar 2022 17:31:32 +0100 Subject: [PATCH] =?UTF-8?q?Sjekk=20om=20l=C3=B8peren=20har=20en=20klasse?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cli.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cli.py b/cli.py index 4b91903..ee3f48a 100755 --- a/cli.py +++ b/cli.py @@ -17,7 +17,11 @@ def print_runners(Runners): table.add_column("Status", justify="right", style="blue") for i in Runners: - table.add_row(i.fullname(), i.club ,str(i.card), i.o_class.name, i.status()) + try: + o_class = i.o_class.name + except: + o_class = '' + table.add_row(i.fullname(), i.club ,str(i.card), o_class, i.status()) console = Console() console.print(table)