diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2022-09-11 07:57:31 +0200 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2022-09-11 07:57:31 +0200 |
| commit | be1966b40fba00e374433d4b7d93598b0ca35223 (patch) | |
| tree | 0b067b5610360d083dc6a69777ae2fe052888a11 | |
| parent | 4b3cc0aa4e8359b68341fb02d74e2c834e85ebcb (diff) | |
Minor changes
| -rw-r--r-- | esds/helpers/platform.py | 9 | ||||
| -rw-r--r-- | example/platform.yaml | 3 |
2 files changed, 6 insertions, 6 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) diff --git a/example/platform.yaml b/example/platform.yaml index 0545c04..0f6134e 100644 --- a/example/platform.yaml +++ b/example/platform.yaml @@ -18,4 +18,5 @@ interfaces: - all 1Bps 10s eth0: type: "wired" - links: all 5Mbps 10s all
\ No newline at end of file + links: + - all 5Mbps 10s all
\ No newline at end of file |
