check for missing winner-event

This commit is contained in:
Yannik Schmidt
2020-06-16 20:45:08 +02:00
parent 2ef05c4f03
commit 77286c8b4c

View File

@@ -185,6 +185,10 @@ class EventSeries():
elif type(e) == MapInformationEvent: elif type(e) == MapInformationEvent:
self.map = e.map self.map = e.map
### check if we had a winner event ###
if self.winnerTeamId < 2:
raise ValueError("Winner event not present or faulty.")
### check if there are players in both teams ### ### check if there are players in both teams ###
if not self.winnerTeam or not self.loserTeam: if not self.winnerTeam or not self.loserTeam:
raise ValueError("One of the teams was empty") raise ValueError("One of the teams was empty")