From 2be034c3fef9fae1ece34627663442be69fb3a14 Mon Sep 17 00:00:00 2001 From: Yannik Schmidt Date: Wed, 30 Sep 2020 08:21:06 +0200 Subject: [PATCH] raise value error if round was too short --- python/Round.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/Round.py b/python/Round.py index 660b201..50d7903 100644 --- a/python/Round.py +++ b/python/Round.py @@ -19,6 +19,8 @@ class Round: if duration <= dt.timedelta(0): raise ValueError("Duration cannot be zero") + if duration <= dt.timedelta(seconds=120): + raise ValueError("Games was too short") self.winners = winnerTeam self.losers = loserTeam