From c3b03417f8bc659087edc85e68a1da0e937cd9d9 Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Sun, 11 Sep 2022 09:54:47 +0200 Subject: [PATCH] Cleaning --- esds/helpers/platform.py | 6 +++++- example/platform.yaml | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/esds/helpers/platform.py b/esds/helpers/platform.py index fdbf29e..b7e5637 100644 --- a/esds/helpers/platform.py +++ b/esds/helpers/platform.py @@ -137,6 +137,8 @@ class YAMLPlatformFile: if not str(nodes["count"]).isnumeric(): self.parsing_error("node count should be a number") self.default["node_count"]=nodes["count"] + else: + self.parsing_error("node count not provided") if "implementations" in nodes: if type(nodes["implementations"]) != list: self.parsing_error("nodes implementations should be a list of file path") @@ -155,7 +157,9 @@ class YAMLPlatformFile: count = len(nodes["implementations"]) if count > 1 and count != self.default["node_count"]: self.parsing_error("If more than one implementation is specified, each node implementation should be provided ("+str(self.default["node_count"])+" in total)") - + else: + self.parsing_error("node implementation not provided") + def parse_general(self): general=self.platform["general"] diff --git a/example/platform.yaml b/example/platform.yaml index 5aa65e3..cf8c3f8 100644 --- a/example/platform.yaml +++ b/example/platform.yaml @@ -7,7 +7,6 @@ general: debug: off interferences: on - nodes: count: 5 implementations: