From de81a03e3da925bbcdc4e3691be95c4d0b772e80 Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Thu, 21 Oct 2021 21:51:14 +0000 Subject: [PATCH] modified config validation for Match module Signed-off-by: Arthur Lu --- src/cli/module.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/cli/module.py b/src/cli/module.py index 2910daa..555c12b 100644 --- a/src/cli/module.py +++ b/src/cli/module.py @@ -36,7 +36,6 @@ class Match: self.teams = teams def validate_config(self): - return True, "" """ if self.config == None: return False, "config cannot be empty" @@ -46,8 +45,10 @@ class Match: return False, "tbakey cannot be empty" elif not(self.config["scope"] in ["competition", "season", "none"]): return False, "scope must be one of: (competition, season, none)" - elif not(self.config["agglomeration"] in ["none", "mean"]): - return False, "agglomeration must be one of: (none, mean)" + elif self.config["agglomeration"] != "none": + return False, "agglomeration must be 'none', there are currently no supported Agglomeration methods" + elif self.config["tests"] == None: + return False, "tests must not be None, it may be empty {}" else: return True, "" """