diff options
Diffstat (limited to 'esds/helpers')
| -rw-r--r-- | esds/helpers/platform.py | 9 |
1 files changed, 4 insertions, 5 deletions
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) |
