From d7f292622292081a51e18259fab88fcc34c64ef1 Mon Sep 17 00:00:00 2001 From: Antoine Van Elstraete Date: Mon, 27 Dec 2021 23:49:41 +0100 Subject: [PATCH] Raise an exception if no mod-stats in knot --- knot_ | 2 ++ 1 file changed, 2 insertions(+) diff --git a/knot_ b/knot_ index 826c590..1a4f5cb 100755 --- a/knot_ +++ b/knot_ @@ -40,6 +40,8 @@ if __name__ == '__main__': file = getenv('stats_file_path') with open(file, "r") as stats_file: stats = yaml.safe_load(stats_file) + if not "mod-stats" in stats: + raise Exception("Please configure knot with mod-stats") if len(argv) > 1 and argv[1] == "config": config = True else: