From 99310d93263d0405533a87776549d10d872bb51a Mon Sep 17 00:00:00 2001 From: Mike Lang Date: Tue, 23 Mar 2021 20:51:50 +1100 Subject: [PATCH] list_races: don't crash if racers aren't set --- list_races.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/list_races.py b/list_races.py index 53e9946..13baa71 100644 --- a/list_races.py +++ b/list_races.py @@ -63,7 +63,10 @@ def main(find1, find2, host='condor.live', user='necrobot-read', password=None, find = [(find1.lower(), find2.lower())] find.append(find[0][::-1]) + for racer1, racer2, match_id, completed in data: + if not racer1: racer1 = '' + if not racer2: racer2 = '' if (racer1.lower(), racer2.lower()) in find: print "{}: {} vs {}, complete = {}".format(match_id, racer1, racer2, completed)