From f182f4fbcc263431b4271a0497a3545f446c18aa Mon Sep 17 00:00:00 2001 From: Christian Wolf Date: Sun, 19 Nov 2023 18:27:15 +0100 Subject: [PATCH] Make table matching between files more robust --- src/solo_turnier/worker.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/solo_turnier/worker.py b/src/solo_turnier/worker.py index ceb25a5..99e8a34 100644 --- a/src/solo_turnier/worker.py +++ b/src/solo_turnier/worker.py @@ -498,10 +498,15 @@ class Worker: if group not in activeGroups: continue - fixture = importedData.htmlResults.tabges[tup] - if fixture[2] is not None and fixture[2] != group: - self.l.log(5, "Skipping id %s in group %s as not part", tup[3], group) - continue + fixture = importedData.htmlResults.tabges.get(tup, None) + if fixture is None: + self.l.error("A fixture for the tuple %s could not be read.", tup) + else: + if fixture[2] is not None and fixture[2] != group: + self.l.log( + 5, "Skipping id %s in group %s as not part", tup[3], group + ) + continue part = importedData.htmlResults.results[tup][0] part.id = int(tup[3])