From be1966b40fba00e374433d4b7d93598b0ca35223 Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Sun, 11 Sep 2022 07:57:31 +0200 Subject: Minor changes --- esds/helpers/platform.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'esds/helpers') diff --git a/esds/helpers/platform.py b/esds/helpers/platform.py index bafd493..7d16756 100644 --- a/esds/helpers/platform.py +++ b/esds/helpers/platform.py @@ -98,11 +98,10 @@ class YAMLPlatformFile: self.parsing_error("Invalid interface type \""+interfaces[i]["type"]+"\"") is_wired=interfaces[i]["type"] == "wired" links=list() - if type(interfaces[i]["links"]) == list: - for link in interfaces[i]["links"]: - links.append(self.parse_link(link)) - else: - links.append(self.parse_link(interfaces[i]["links"])) + if type(interfaces[i]["links"]) != list: + self.parsing_error("Invalide type of links in interface "+i) + for link in interfaces[i]["links"]: + links.append(self.parse_link(link)) ##### Create network matrix BW=np.full((node_count,node_count),0) LAT=np.full((node_count,node_count),0) -- cgit v1.2.3